]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_timedbans.cpp
Fix warning
[user/henk/code/inspircd.git] / src / modules / m_timedbans.cpp
index 40c99484209684306dc3b3e4056ea53031c3ade2..78915e3ef5280956fd8a7933beb8c16f2d3b9ad0 100644 (file)
@@ -57,7 +57,7 @@ class CommandTban : public Command
                                {
                                        if (!strcasecmp(i->data,parameters[2].c_str()))
                                        {
-                                               user->WriteServ("NOTICE "+std::string(user->nick)+" :The ban "+std::string(parameters[2])+" is already on the banlist of "+std::string(parameters[0]));
+                                               user->WriteServ("NOTICE "+std::string(user->nick)+" :The ban "+parameters[2]+" is already on the banlist of "+parameters[0]);
                                                return CMD_FAILURE;
                                        }
                                }
@@ -72,9 +72,9 @@ class CommandTban : public Command
                                }
                                std::string mask = parameters[2];
                                std::vector<std::string> setban;
-                               setban[0] = parameters[0];
-                               setban[1] = "+b";
-                               setban[2] = parameters[2];
+                               setban.push_back(parameters[0]);
+                               setban.push_back("+b");
+                               setban.push_back(parameters[2]);
                                // use CallCommandHandler to make it so that the user sets the mode
                                // themselves
                                ServerInstance->CallCommandHandler("MODE",setban,user);
@@ -159,9 +159,9 @@ class ModuleTimedBans : public Module
                                {
                                        std::string mask = safei->mask;
                                        std::vector<std::string> setban;
-                                       setban[0] = safei->channel;
-                                       setban[1] = "-b";
-                                       setban[2] = mask;
+                                       setban.push_back(safei->channel);
+                                       setban.push_back("-b");
+                                       setban.push_back(mask);
 
                                        CUList empty;
                                        cr->WriteAllExcept(ServerInstance->FakeClient, true, '@', empty, "NOTICE %s :*** Timed ban on %s expired.", cr->name, safei->mask.c_str());