summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-09 17:42:56 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-09 17:42:56 +0000
commit19b34cde73ce410fdc335127efe4d7080270feb2 (patch)
treea54b68df8c0d06f9116afdf74479831271c9d358
parent4d7116b3176f1b32374c6fe640b2cd2a0f4b62f6 (diff)
I'll give you ##TOAST, :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5189 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/command_parse.cpp2
-rw-r--r--src/hashcomp.cpp7
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++;