From 6cb4769f8dd209a54a7804922246dcfce63e20a2 Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 14 Jun 2015 12:09:16 +0000 Subject: [PATCH] - 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 --- src/opercmd.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) 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, -- 2.30.2