From: michael Date: Sat, 3 Jan 2015 20:58:17 +0000 (+0000) Subject: - opercmd.c, opercmd.h: removed unused function arguments; constification X-Git-Tag: 1.0.0~3 X-Git-Url: http://git.serene-ircd.net/?a=commitdiff_plain;h=5859685eff259ed3534b4e2687d1cc7add2bfb2e;p=hopm.git - opercmd.c, opercmd.h: removed unused function arguments; constification git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/branches/1.0.x@5292 82007160-df01-0410-b94d-b575c5fd34c7 --- diff --git a/src/opercmd.c b/src/opercmd.c index 4195de8..4cd7c82 100644 --- a/src/opercmd.c +++ b/src/opercmd.c @@ -47,9 +47,9 @@ static list_t *COMMANDS = NULL; /* List of active commands */ static struct Command *command_create(const struct OperCommandHash *, char *param, char *irc_nick, struct ChannelConf *target); static void command_free(struct Command *); -static void cmd_check(char *, char *, struct ChannelConf *); -static void cmd_stat(char *, char *, struct ChannelConf *); -static void cmd_fdstat(char *, char *, struct ChannelConf *); +static void cmd_check(char *, struct ChannelConf *); +static void cmd_stat(char *, struct ChannelConf *); +static void cmd_fdstat(char *, struct ChannelConf *); static struct OperCommandHash COMMAND_TABLE[] = { @@ -254,7 +254,7 @@ command_free(struct Command *command) * */ void -command_userhost(char *reply) +command_userhost(const char *reply) { node_t *node, *next; char *tmp; @@ -284,7 +284,7 @@ command_userhost(char *reply) if (strcmp(cs->irc_nick, reply) == 0) { if (oper) - cs->tab->handler(cs->param, cs->irc_nick, cs->target); + cs->tab->handler(cs->param, cs->target); /* Cleanup the command */ command_free(cs); @@ -301,12 +301,11 @@ command_userhost(char *reply) * * Parameters: * param: Parameters of the command - * source: irc_nick of user who requested the command * target: channel command was sent to * */ static void -cmd_check(char *param, char *source, struct ChannelConf *target) +cmd_check(char *param, struct ChannelConf *target) { scan_manual(param, target); } @@ -317,11 +316,10 @@ cmd_check(char *param, char *source, struct ChannelConf *target) * * Parameters: * param: Parameters of the command - * source: irc_nick of user who requested the command * target: channel command was sent to */ static void -cmd_stat(char *param, char *source, struct ChannelConf *target) +cmd_stat(char *param, struct ChannelConf *target) { stats_output(target->name); } @@ -332,11 +330,10 @@ cmd_stat(char *param, char *source, struct ChannelConf *target) * * Parameters: * param: Parameters of the command - * source: irc_nick of user who requested the command * target: channel command was sent to */ static void -cmd_fdstat(char *param, char *source, struct ChannelConf *target) +cmd_fdstat(char *param, struct ChannelConf *target) { fdstats_output(target->name); } diff --git a/src/opercmd.h b/src/opercmd.h index d97776e..bf67124 100644 --- a/src/opercmd.h +++ b/src/opercmd.h @@ -7,7 +7,7 @@ struct OperCommandHash { const char *command; - void (*handler)(char *, char *, struct ChannelConf *); + void (*handler)(char *, struct ChannelConf *); }; struct Command @@ -37,7 +37,7 @@ struct Command }; extern void command_init(void); -extern void command_userhost(char *); +extern void command_userhost(const char *); extern void command_timer(void); extern void command_parse(char *, char *, struct ChannelConf *, struct UserInfo *); #endif