diff options
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,' ')) { |