From: michael Date: Sun, 14 Jun 2015 12:09:16 +0000 (+0000) Subject: - opercmd.c: moved the COMMAND_TABLE into command_parse() X-Git-Tag: 1.1.0beta1~32 X-Git-Url: http://git.serene-ircd.net/?a=commitdiff_plain;h=6cb4769f8dd209a54a7804922246dcfce63e20a2;p=hopm.git - opercmd.c: moved the COMMAND_TABLE into command_parse() git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@6140 82007160-df01-0410-b94d-b575c5fd34c7 --- diff --git a/src/opercmd.c b/src/opercmd.c index a63c87f..6780eab 100644 --- a/src/opercmd.c +++ b/src/opercmd.c @@ -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,