X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommand_parse.cpp;h=61f59ac0b1de3bfa6ced6328902e94e106a83a6e;hb=48a400f2e068527b338ceecf8ed1dde2da971ca9;hp=7e0c1c76dbf3ebad702a9ec1bdb1e2bcf29fdb5b;hpb=8a545d0044db581616f265f6e55e51ed83a23eba;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 7e0c1c76d..61f59ac0b 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -60,7 +60,7 @@ bool CommandParser::LoopCall(User* user, Command* handler, const std::vector dupes; + insp::flat_set dupes; bool check_dupes = (extra < 0); /* Create two sepstreams, if we have only one list, then initialize the second sepstream with @@ -80,7 +80,7 @@ bool CommandParser::LoopCall(User* user, Command* handler, const std::vectorConfig->MaxTargets)) { - if ((!check_dupes) || (dupes.insert(item.c_str()).second)) + if ((!check_dupes) || (dupes.insert(item).second)) { std::vector new_parameters(parameters); new_parameters[splithere] = item; @@ -295,7 +295,7 @@ void CommandParser::ProcessCommand(LocalUser *user, std::string &cmd) } ServerInstance->SNO->WriteToSnoMask('a', "%s denied for %s (%s@%s)", - command.c_str(), user->nick.c_str(), user->ident.c_str(), user->host.c_str()); + command.c_str(), user->nick.c_str(), user->ident.c_str(), user->GetRealHost().c_str()); return; } @@ -307,7 +307,7 @@ void CommandParser::ProcessCommand(LocalUser *user, std::string &cmd) user->CommandFloodPenalty += failpenalty; user->WriteNumeric(ERR_NEEDMOREPARAMS, command, "Not enough parameters."); if ((ServerInstance->Config->SyntaxHints) && (user->registered == REG_ALL) && (handler->syntax.length())) - user->WriteNumeric(RPL_SYNTAX, InspIRCd::Format("SYNTAX %s %s", handler->name.c_str(), handler->syntax.c_str())); + user->WriteNumeric(RPL_SYNTAX, handler->name, handler->syntax); return; } @@ -359,7 +359,7 @@ CommandBase::~CommandBase() { } -void CommandBase::EncodeParameter(std::string& parameter, int index) +void CommandBase::EncodeParameter(std::string& parameter, unsigned int index) { }