From 9a3475ed584b09c221219b306611c0b691161a08 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 14 Apr 2005 12:09:53 +0000 Subject: Added OnPreCommand git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1080 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 7b0babd91..273259019 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -3020,6 +3020,7 @@ void process_command(userrec *user, char* cmd) log(DEBUG,"process_command: handler: %s %s %d",user->nick,command,items); if (cmdlist[i].handler_function) { + /* ikky /stats counters */ if (temp) { @@ -3034,6 +3035,12 @@ void process_command(userrec *user, char* cmd) cmdlist[i].total_bytes+=strlen(temp); } + int MOD_RESULT = 0; + FOREACH_RESULT(OnPreCommand(command,command_p,items,user)); + if (MOD_RESULT == 1) { + return; + } + /* WARNING: nothing may come after the * command handler call, as the handler * may free the user structure! */ -- cgit v1.2.3