]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/hashcomp.cpp
Now with added ANGRY MONKEYS.
[user/henk/code/inspircd.git] / src / hashcomp.cpp
index 9b3b5b5b1c8b64dce75c99149dd46cc127a6ee09..bfbabfde90b5ae8dbfb6882eafd6ffc667631114 100644 (file)
@@ -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();
 }