From e44c77aa89b0ff018645783172bcd84791c74c04 Mon Sep 17 00:00:00 2001 From: peavey Date: Sun, 4 May 2008 22:34:00 +0000 Subject: Ok 3rd time lucky, thanks for the pointers Brain git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9615 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_alias.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 2287210c6..1c44e2e2f 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -247,16 +247,13 @@ class ModuleAlias : public Module SearchAndReplace(newline, "\r", "$"); irc::tokenstream ss(newline); - - std::vector parms; - ss.GetToken(pars[0]); - 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 ¶meter) -- cgit v1.2.3