From 19b34cde73ce410fdc335127efe4d7080270feb2 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 9 Sep 2006 17:42:56 +0000 Subject: I'll give you ##TOAST, :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5189 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/hashcomp.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/hashcomp.cpp') 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++; -- cgit v1.3.1-10-gc9f91