diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-09 17:42:56 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-09 17:42:56 +0000 |
commit | 19b34cde73ce410fdc335127efe4d7080270feb2 (patch) | |
tree | a54b68df8c0d06f9116afdf74479831271c9d358 /src/hashcomp.cpp | |
parent | 4d7116b3176f1b32374c6fe640b2cd2a0f4b62f6 (diff) |
I'll give you ##TOAST, :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5189 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/hashcomp.cpp')
-rw-r--r-- | src/hashcomp.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index d3db02da4..682501f23 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -263,7 +263,12 @@ const std::string irc::commasepstream::GetToken() if ((*n == ',') || (n+1 == tokens.end())) { last_starting_position = n+1; - return std::string(lsp, n+1 == tokens.end() ? n+1 : n++); + std::string strip = std::string(lsp, n+1 == tokens.end() ? n+1 : n++); + + while ((strip.length()) && (strip.find_last_of(',') == strip.length() - 1)) + strip.erase(strip.end() - 1); + + return strip; } n++; |