diff options
| author | 2006-08-06 23:38:58 +0000 | |
|---|---|---|
| committer | 2006-08-06 23:38:58 +0000 | |
| commit | db1ab20263a735cd7eec2182ea1b4161d80fed40 (patch) | |
| tree | 0335fce30024fb4c4f5b55061975df05bdbc38a0 /src/hashcomp.cpp | |
| parent | Left nick out of the cidr/ip check in bans/join, would never match (diff) | |
Remove trailing spaces from input in irc::ircsepstream
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4759 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/hashcomp.cpp')
| -rw-r--r-- | src/hashcomp.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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(); } |
