Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: ModuleCommandSetService()  (Read 3350 times)

0 Members and 1 Guest are viewing this topic.

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
ModuleCommandSetService()
« on: September 30, 2007, 12:13:42 AM »

Call it what you will.. but I noticed when I was doing some coding on a pseudo client that when I checked the command table it was listed as "unknown" sure enough the code when adding a command if the command table is not known just sets unknown, it would be nice if modules could change this for debugging.. its a bitch to have 10+ unknowns, I have added a code snippet below that I added to my module to make my life easier


Code: [Select]

void ModuleCommandSetService(Command *c, char *servicename)
{
    if (c && servicename) {
        if (c->service) {
            free(c->service);
        }
        c->service = sstrdup(servicename);
    }
}
Logged
my God my tourniquet, return to me salvation
Pages: [1]   Go Up