[srvx-commits] CVS: services/src modcmd.c,1.38,1.39
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2002-11-22 02:39:55
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv15725/src
Modified Files:
modcmd.c
Log Message:
svccmd_copy_rules() after calling svccmd_insert() so svccmd->cmd is set properly
Index: modcmd.c
===================================================================
RCS file: /cvsroot/srvx/services/src/modcmd.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -r1.38 -r1.39
*** modcmd.c 12 Nov 2002 20:18:56 -0000 1.38
--- modcmd.c 22 Nov 2002 02:39:52 -0000 1.39
***************
*** 185,189 ****
struct module *module = data;
dict_delete(module->commands);
! if (module->helpfile) close_helpfile(module->helpfile);
free(module->name);
free(module);
--- 185,189 ----
struct module *module = data;
dict_delete(module->commands);
! close_helpfile(module->helpfile);
free(module->name);
free(module);
***************
*** 817,822 ****
}
svccmd = calloc(1, sizeof(*svccmd));
svccmd_copy_rules(svccmd, cmd->defaults);
! return svccmd_insert(service, strdup(name), svccmd, cmd);
}
--- 817,823 ----
}
svccmd = calloc(1, sizeof(*svccmd));
+ svccmd_insert(service, strdup(name), svccmd, cmd);
svccmd_copy_rules(svccmd, cmd->defaults);
! return svccmd;
}
***************
*** 976,981 ****
}
- svccmd_copy_rules(newcmd, template);
svccmd_insert(service, newcmd->name, newcmd, template->command);
reply(MCMSG_COMMAND_BOUND, newcmd->name, newcmd->parent->bot->nick);
return 1;
--- 977,982 ----
}
svccmd_insert(service, newcmd->name, newcmd, template->command);
+ svccmd_copy_rules(newcmd, template);
reply(MCMSG_COMMAND_BOUND, newcmd->name, newcmd->parent->bot->nick);
return 1;
|