]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_alias.cpp
and no need to cast parameters to std::string here
[user/henk/code/inspircd.git] / src / modules / m_alias.cpp
index ffe2946a5fc12604ebfad0e0c3393169fd6a3eff..1c44e2e2fd413589e1f34e7611f10b6aaea5f808 100644 (file)
@@ -247,15 +247,13 @@ class ModuleAlias : public Module
                SearchAndReplace(newline, "\r", "$");
 
                irc::tokenstream ss(newline);
-
-               std::vector<std::string> parms;
-               int x = 1;
-               while (ss.GetToken(pars[x]) && parms.size() <= MAXPARAMETERS)
+               std::string command, token;
+               ss.GetToken(command);
+               while (ss.GetToken(token) && (pars.size() <= MAXPARAMETERS))
                {
-                       parms.push_back(pars[x]);
-                       x++;
+                       pars.push_back(token);
                }
-               ServerInstance->Parser->CallHandler(pars[0], parms, user);
+               ServerInstance->Parser->CallHandler(command, pars, user);
        }
  
        virtual void OnRehash(User* user, const std::string &parameter)