]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_alias.cpp
Make User:: nick/ident/dhost/fullname and some other things std::string instead of...
[user/henk/code/inspircd.git] / src / modules / m_alias.cpp
index 1c44e2e2fd413589e1f34e7611f10b6aaea5f808..1eb78023e388480369a841143a960a93be719de1 100644 (file)
@@ -74,8 +74,6 @@ class ModuleAlias : public Module
                : Module(Me)
        {
                ReadAliases();
-               pars.resize(MAXPARAMETERS);
-
                Me->Modules->Attach(I_OnPreCommand, this);
                Me->Modules->Attach(I_OnRehash, this);
 
@@ -159,7 +157,7 @@ class ModuleAlias : public Module
                                /* Does it match the pattern? */
                                if (!Aliases[i].format.empty())
                                {
-                                       if (!match(Aliases[i].case_sensitive, compare.c_str(), Aliases[i].format.c_str()))
+                                       if (!match(Aliases[i].case_sensitive, compare, Aliases[i].format))
                                                continue;
                                }
 
@@ -247,7 +245,9 @@ class ModuleAlias : public Module
                SearchAndReplace(newline, "\r", "$");
 
                irc::tokenstream ss(newline);
+               pars.clear();
                std::string command, token;
+
                ss.GetToken(command);
                while (ss.GetToken(token) && (pars.size() <= MAXPARAMETERS))
                {