]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
Fix a ton of -Wsign-conversion warnings.
[user/henk/code/inspircd.git] / src / command_parse.cpp
index 514394a572e2ec3a0f2cd5ad37b53ef4ab03d659..61f59ac0b1de3bfa6ced6328902e94e106a83a6e 100644 (file)
@@ -60,7 +60,7 @@ bool CommandParser::LoopCall(User* user, Command* handler, const std::vector<std
         *
         * Only check for duplicates if there is one list (allow them in JOIN).
         */
-       insp::flat_set<irc::string> dupes;
+       insp::flat_set<std::string, irc::insensitive_swo> 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::vector<std
         */
        while (items1.GetToken(item) && (!usemax || max++ < ServerInstance->Config->MaxTargets))
        {
-               if ((!check_dupes) || (dupes.insert(item.c_str()).second))
+               if ((!check_dupes) || (dupes.insert(item).second))
                {
                        std::vector<std::string> 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)
 {
 }
 
@@ -390,8 +390,7 @@ void CommandParser::ProcessBuffer(std::string &buffer,LocalUser *user)
        if (buffer.empty())
                return;
 
-       ServerInstance->Logs->Log("USERINPUT", LOG_RAWIO, "C[%s] I :%s %s",
-               user->uuid.c_str(), user->nick.c_str(), buffer.c_str());
+       ServerInstance->Logs->Log("USERINPUT", LOG_RAWIO, "C[%s] I %s", user->uuid.c_str(), buffer.c_str());
        ProcessCommand(user,buffer);
 }