From 9ed4641ba3aaac8e133a73ec1c3d42965ee59241 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 12 Apr 2004 16:05:08 +0000 Subject: Added preliminary support for a bottler-detection module Fixed broken rewrite in OnServerRaw git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@566 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 3929138d6..823372460 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -5796,10 +5796,21 @@ void process_command(userrec *user, char* cmd) strcpy(temp,cmd); - string tmp = cmd; - FOREACH_MOD OnServerRaw(tmp,true); - const char* cmd2 = tmp.c_str(); - snprintf(cmd,512,"%s",cmd2); + std::string tmp = cmd; + for (int i = 0; i <= MODCOUNT; i++) + { + std::string oldtmp = tmp; + modules[i]->OnServerRaw(tmp,true); + if (oldtmp != tmp) + { + log(DEBUG,"A Module changed the input string!"); + log(DEBUG,"New string: %s",tmp.c_str()); + log(DEBUG,"Old string: %s",oldtmp.c_str()); + break; + } + } + strncpy(cmd,tmp.c_str(),MAXBUF); + strcpy(temp,cmd); if (!strchr(cmd,' ')) { -- cgit v1.2.3