diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-12 16:05:08 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-12 16:05:08 +0000 |
commit | 9ed4641ba3aaac8e133a73ec1c3d42965ee59241 (patch) | |
tree | 4bbd24979c93a410ff719603acf850b0b3e5c983 /src/inspircd.cpp | |
parent | 30aea7a691da96b17509502dab300fe6421e7beb (diff) |
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
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
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,' ')) { |