summaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-04-02 22:11:14 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-04-02 22:11:14 +0000
commit5870145ac255da65f5bf4ff0fae4715cbb930ec9 (patch)
tree91684986ad437786fe85ba6a18973c62ebd3b02a /src/command_parse.cpp
parentef960ee420460e437b49e8085c3f1158c60752b9 (diff)
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
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp5
1 files changed, 3 insertions, 2 deletions
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++;