- opercmd.c, opercmd.h: removed unused function arguments; constification
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Sat, 3 Jan 2015 20:58:17 +0000 (20:58 +0000)
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Sat, 3 Jan 2015 20:58:17 +0000 (20:58 +0000)
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/branches/1.0.x@5292 82007160-df01-0410-b94d-b575c5fd34c7

src/opercmd.c
src/opercmd.h

index 4195de8644cc43ed2052e2dc4f4d4c73bd813ef1..4cd7c82d47396b110bed144288682a8f54667c2f 100644 (file)
@@ -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);
 }
index d97776e725e97bf46ed2dd89ad4dadcf675161b8..bf671248b336e526cdfdaf53a01ebb5782e0d6d5 100644 (file)
@@ -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