From 0fad2325b495aea5302abce3d9c3f0bd0720281e Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 21 Dec 2005 20:33:32 +0000 Subject: Improved m_alias to only capture complete commands and rewrite them (bug #92 as reported by strike) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2601 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/command_parse.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/command_parse.cpp') diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 6f927e89a..7c26ffe61 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -525,6 +525,11 @@ void CommandParser::ProcessCommand(userrec *user, char* cmd) { /* activity resets the ping pending timer */ user->nping = TIME + user->pingmax; + int MOD_RESULT = 0; + FOREACH_RESULT(OnPreCommand(command,command_p,items,user,false)); + if (MOD_RESULT == 1) { + return; + } if ((items) < cmdlist[i]->min_params) { log(DEBUG,"not enough parameters: %s %s",user->nick,command); @@ -581,7 +586,7 @@ void CommandParser::ProcessCommand(userrec *user, char* cmd) } int MOD_RESULT = 0; - FOREACH_RESULT(OnPreCommand(command,command_p,items,user)); + FOREACH_RESULT(OnPreCommand(command,command_p,items,user,true)); if (MOD_RESULT == 1) { return; } -- cgit v1.3.1-10-gc9f91