]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_opermodes.cpp
Add support for blacklists and whitelists, just http password auth to go (the most...
[user/henk/code/inspircd.git] / src / modules / m_opermodes.cpp
index 877b9b441fa7da06769f17d79470ea53714bbeec..4184409f15ab062909772ce5c387537807441589 100644 (file)
@@ -99,16 +99,13 @@ class ModuleModesOnOper : public Module
                while (ss >> buf)
                        tokens.push_back(buf);
 
-               int size = tokens.size() + 1;
-               const char** modes = new const char*[size];
-               modes[0] = u->nick;
+               std::vector<std::string> modes;
+               modes.push_back(u->nick);
 
                // process mode params
-               int i = 1;
                for (unsigned int k = 0; k < tokens.size(); k++)
                {
-                       modes[i] = tokens[k].c_str();
-                       i++;
+                       modes.push_back(tokens[k]);
                }
 
                std::deque<std::string> n;
@@ -116,8 +113,7 @@ class ModuleModesOnOper : public Module
                        n.push_back(modes[j]);
 
                ServerInstance->PI->SendMode(u->uuid, n);
-               ServerInstance->SendMode(modes, size, u);
-               delete [] modes;
+               ServerInstance->SendMode(modes, u);
        }
 };