X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommand_parse.cpp;h=57a86b0cde18b1e0a42ffd0e87c08118aef2b9da;hb=dd36852a52e8541306b76c5b88bce8ab9b36654c;hp=bc84982eb13a12ee3dc075abcd4978554edb2ac4;hpb=5db1d322be106c8462dc691072f9415dc0766ed4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/command_parse.cpp b/src/command_parse.cpp index bc84982eb..57a86b0cd 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -48,7 +48,7 @@ int InspIRCd::PassCompare(Extensible* ex, const char* data,const char* input, co * The second version is much simpler and just has the one stream to read, and is used in NAMES, WHOIS, PRIVMSG etc. * Both will only parse until they reach ServerInstance->Config->MaxTargets number of targets, to stop abuse via spam. */ -int CommandParser::LoopCall(User* user, Command* CommandObj, const char** parameters, int pcnt, unsigned int splithere, unsigned int extra) +int CommandParser::LoopCall(User* user, Command* CommandObj, const char* const* parameters, int pcnt, unsigned int splithere, unsigned int extra) { /* First check if we have more than one item in the list, if we don't we return zero here and the handler * which called us just carries on as it was. @@ -97,7 +97,7 @@ int CommandParser::LoopCall(User* user, Command* CommandObj, const char** parame return 1; } -int CommandParser::LoopCall(User* user, Command* CommandObj, const char** parameters, int pcnt, unsigned int splithere) +int CommandParser::LoopCall(User* user, Command* CommandObj, const char* const* parameters, int pcnt, unsigned int splithere) { /* First check if we have more than one item in the list, if we don't we return zero here and the handler * which called us just carries on as it was. @@ -127,8 +127,6 @@ int CommandParser::LoopCall(User* user, Command* CommandObj, const char** parame new_parameters[splithere] = item.c_str(); - parameters[splithere] = item.c_str(); - /* Execute the command handler over and over. If someone pulls our user * record out from under us (e.g. if we /kill a comma sep list, and we're * in that list ourselves) abort if we're gone. @@ -180,7 +178,7 @@ Command* CommandParser::GetHandler(const std::string &commandname) // calls a handler function for a command -CmdResult CommandParser::CallHandler(const std::string &commandname,const char** parameters, int pcnt, User *user) +CmdResult CommandParser::CallHandler(const std::string &commandname,const char* const* parameters, int pcnt, User *user) { Commandable::iterator n = cmdlist.find(commandname); @@ -413,7 +411,7 @@ bool CommandParser::ProcessBuffer(std::string &buffer,User *user) if (buffer.length()) { - ServerInstance->Logs->Log("USERIO", DEBUG,"C[%d] I :%s %s",user->GetFd(), user->nick, buffer.c_str()); + ServerInstance->Logs->Log("USERINPUT", DEBUG,"C[%d] I :%s %s",user->GetFd(), user->nick, buffer.c_str()); return this->ProcessCommand(user,buffer); } @@ -500,7 +498,7 @@ bool CommandParser::ReloadCommand(const char* cmd, User* user) return false; } -CmdResult cmd_reload::Handle(const char** parameters, int /* pcnt */, User *user) +CmdResult cmd_reload::Handle(const char* const* parameters, int /* pcnt */, User *user) { user->WriteServ("NOTICE %s :*** Reloading command '%s'",user->nick, parameters[0]); if (ServerInstance->Parser->ReloadCommand(parameters[0], user))