]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
Optimizations
[user/henk/code/inspircd.git] / src / command_parse.cpp
index a158ff6a36be9ac17d8e2def2f2ec91465988758..8722a2145599c9419f0d1ae16b86f0bf9443f218 100644 (file)
@@ -327,7 +327,7 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
        std::transform(command.begin(), command.end(), command.begin(), ::toupper);
                
        int MOD_RESULT = 0;
-       FOREACH_RESULT(I_OnPreCommand,OnPreCommand(command,command_p,items,user,false));
+       FOREACH_RESULT(I_OnPreCommand,OnPreCommand(command,command_p,items,user,false,cmd));
        if (MOD_RESULT == 1) {
                return;
        }
@@ -374,7 +374,7 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
                                cm->second->total_bytes += cmd.length();
 
                                int MOD_RESULT = 0;
-                               FOREACH_RESULT(I_OnPreCommand,OnPreCommand(command,command_p,items,user,true));
+                               FOREACH_RESULT(I_OnPreCommand,OnPreCommand(command,command_p,items,user,true,cmd));
                                if (MOD_RESULT == 1)
                                        return;
 
@@ -387,7 +387,7 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
 
                                if (result != CMD_USER_DELETED)
                                {
-                                       FOREACH_MOD(I_OnPostCommand,OnPostCommand(command, command_p, items, user, result));
+                                       FOREACH_MOD(I_OnPostCommand,OnPostCommand(command, command_p, items, user, result,cmd));
                                }
                                return;
                        }
@@ -518,7 +518,7 @@ bool CommandParser::ReloadCommand(const char* cmd)
                dlclose(command->second);
                RFCCommands.erase(command);
 
-               sprintf(filename, "cmd_%s.so", commandname);
+               snprintf(filename, MAXBUF, "cmd_%s.so", commandname);
                this->LoadCommand(filename);
 
                return true;