From 5870145ac255da65f5bf4ff0fae4715cbb930ec9 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 2 Apr 2007 22:11:14 +0000 Subject: This needs some general QA-ing. Add support to new parser (introduced in 1.1) for empty final params (just the colon) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6731 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/command_parse.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/command_parse.cpp') diff --git a/src/command_parse.cpp b/src/command_parse.cpp index f84df3342..71fce09fd 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -273,9 +273,10 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd) const char *command_p[127]; int items = 0; irc::tokenstream tokens(cmd); - std::string command = tokens.GetToken(); + std::string command; + tokens.GetToken(command); - while (((para[items] = tokens.GetToken()) != "") && (items < 127)) + while (tokens.GetToken(para[items]) && (items < 127)) { command_p[items] = para[items].c_str(); items++; -- cgit v1.2.3