diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/command_parse.cpp | 2 | ||||
-rw-r--r-- | src/hashcomp.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 11f4b4635..be61ef869 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -241,6 +241,7 @@ int CommandParser::LoopCall(userrec* user, command_t* CommandObj, const char** p return 0; /* Only one commasepstream here */ + ServerInstance->Log(DEBUG,"LoopCall on '%s'",parameters[splithere]); irc::commasepstream items1(parameters[splithere]); std::string item = ""; unsigned int max = 0; @@ -251,6 +252,7 @@ int CommandParser::LoopCall(userrec* user, command_t* CommandObj, const char** p */ while (((item = items1.GetToken()) != "") && (max++ < ServerInstance->Config->MaxTargets)) { + ServerInstance->Log(DEBUG,"LoopCall get item: '%s'", item.c_str()); parameters[splithere] = item.c_str(); CommandObj->Handle(parameters,pcnt,user); } 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++; |