]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
Remove trailing spaces from input in irc::ircsepstream
[user/henk/code/inspircd.git] / src / command_parse.cpp
index 386f0932176a46e5a92becbab3ec9ebebc3ffad4..735d17b8adb67cc0fb25ee9084e3ad6f2dc10190 100644 (file)
 #include <string>
 #include <sstream>
 #include <vector>
-#include <sched.h>
-#ifdef THREADED_DNS
-#include <pthread.h>
-#endif
+#include <algorithm>
 #include "users.h"
 #include "globals.h"
 #include "modules.h"
@@ -40,7 +37,6 @@
 #include "commands.h"
 #include "xline.h"
 #include "inspstring.h"
-#include "dnsqueue.h"
 #include "helperfuncs.h"
 #include "hashcomp.h"
 #include "socketengine.h"
@@ -210,10 +206,12 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
        std::string command = tokens.GetToken();
 
        while (((para[items] = tokens.GetToken()) != "") && (items < 127))
+       {
+               log(DEBUG,"Param: '%s'",para[items].c_str());
                command_p[items] = para[items++].c_str();
+       }
 
-       for (std::string::iterator makeupper = command.begin(); makeupper != command.end(); makeupper++)
-               *makeupper = toupper(*makeupper);
+       std::transform(command.begin(), command.end(), command.begin(), ::toupper);
                
        int MOD_RESULT = 0;
        FOREACH_RESULT(I_OnPreCommand,OnPreCommand(command,command_p,items,user,false));