summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/command_parse.cpp3
-rw-r--r--src/hashcomp.cpp5
2 files changed, 8 insertions, 0 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 922427c28..735d17b8a 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -206,7 +206,10 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
std::string command = tokens.GetToken();
while (((para[items] = tokens.GetToken()) != "") && (items < 127))
+ {
+ log(DEBUG,"Param: '%s'",para[items].c_str());
command_p[items] = para[items++].c_str();
+ }
std::transform(command.begin(), command.end(), command.begin(), ::toupper);
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index 9b3b5b5b1..bfbabfde9 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -187,6 +187,11 @@ std::istream& operator>>(std::istream &is, irc::string &str)
irc::tokenstream::tokenstream(const std::string &source) : tokens(source), last_pushed(false)
{
+ /* Remove trailing spaces, these muck up token parsing */
+ while (tokens.find_last_of(' ') == tokens.length() - 1)
+ tokens.erase(tokens.end() - 1);
+
+ /* Record starting position and current position */
last_starting_position = tokens.begin();
n = tokens.begin();
}