- opercmd.c: moved the COMMAND_TABLE into command_parse()
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Sun, 14 Jun 2015 12:09:35 +0000 (12:09 +0000)
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Sun, 14 Jun 2015 12:09:35 +0000 (12:09 +0000)
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/branches/1.0.x@6141 82007160-df01-0410-b94d-b575c5fd34c7

src/opercmd.c

index a63c87fd1756bef4ec2e9b2a51d49a49dd10b61c..6780eab75e65493043fa64654f9a87436ba63838 100644 (file)
@@ -166,18 +166,6 @@ command_free(struct Command *command)
   xfree(command);
 }
 
-static const struct OperCommandHash COMMAND_TABLE[] =
-{
-  { "CHECK",     cmd_check     },
-  { "SCAN",      cmd_check     },
-  { "STAT",      cmd_stat      },
-  { "STATS",     cmd_stat      },
-  { "STATUS",    cmd_stat      },
-  { "FDSTAT",    cmd_fdstat    },
-  { "PROTOCOLS", cmd_protocols },
-  { NULL,        NULL          }
-};
-
 /* command_parse
  *
  *    Parse a command to hopm (sent to a channel hopm is on). The command is parsed
@@ -196,6 +184,17 @@ command_parse(char *command, const struct ChannelConf *target,
               const struct UserInfo *source_p)
 {
   char *param;  /* Parsed parameters */
+  static const struct OperCommandHash COMMAND_TABLE[] =
+  {
+    { "CHECK",     cmd_check     },
+    { "SCAN",      cmd_check     },
+    { "STAT",      cmd_stat      },
+    { "STATS",     cmd_stat      },
+    { "STATUS",    cmd_stat      },
+    { "FDSTAT",    cmd_fdstat    },
+    { "PROTOCOLS", cmd_protocols },
+    { NULL,        NULL          }
+  };
 
   if (OPT_DEBUG)
     log_printf("COMMAND -> Parsing command (%s) from %s [%s]", command,