]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_alias.cpp
Fix crash if OnCheckBan is called and there is no list, the if was reversed.
[user/henk/code/inspircd.git] / src / modules / m_alias.cpp
index 1c44e2e2fd413589e1f34e7611f10b6aaea5f808..e0e4e647797aba3e1d8f2b5902f8094fd342bb28 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);
 
@@ -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))
                {