From 506137fa75ec09716a44ecf5fdc2fedeeddc0997 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 5 Nov 2006 14:06:10 +0000 Subject: Whoops, make targets case insensitive when cutting down a comma seperated list git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5656 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/command_parse.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/command_parse.cpp') diff --git a/src/command_parse.cpp b/src/command_parse.cpp index dcdff1b43..b67b269d2 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -214,7 +214,7 @@ int CommandParser::LoopCall(userrec* user, command_t* CommandObj, const char** p * By using std::map (thanks for the idea w00t) we can cut this down a ton. * ...VOOODOOOO! */ - std::map dupes; + std::map dupes; /* Create two lists, one for channel names, one for keys */ @@ -229,7 +229,7 @@ int CommandParser::LoopCall(userrec* user, command_t* CommandObj, const char** p */ while (((item = items1.GetToken()) != "") && (max++ < ServerInstance->Config->MaxTargets)) { - if (dupes.find(item) == dupes.end()) + if (dupes.find(item.c_str()) == dupes.end()) { const char* new_parameters[127]; @@ -243,7 +243,7 @@ int CommandParser::LoopCall(userrec* user, command_t* CommandObj, const char** p CommandObj->Handle(new_parameters,pcnt,user); - dupes[item] = true; + dupes[item.c_str()] = true; } } return 1; @@ -257,7 +257,7 @@ int CommandParser::LoopCall(userrec* user, command_t* CommandObj, const char** p if (!strchr(parameters[splithere],',')) return 0; - std::map dupes; + std::map dupes; /* Only one commasepstream here */ ServerInstance->Log(DEBUG,"Splitting '%s'",parameters[splithere]); @@ -271,7 +271,7 @@ int CommandParser::LoopCall(userrec* user, command_t* CommandObj, const char** p */ while (((item = items1.GetToken()) != "") && (max++ < ServerInstance->Config->MaxTargets)) { - if (dupes.find(item) == dupes.end()) + if (dupes.find(item.c_str()) == dupes.end()) { const char* new_parameters[127]; @@ -283,7 +283,7 @@ int CommandParser::LoopCall(userrec* user, command_t* CommandObj, const char** p parameters[splithere] = item.c_str(); CommandObj->Handle(new_parameters,pcnt,user); - dupes[item] = true; + dupes[item.c_str()] = true; } } /* By returning 1 we tell our caller that nothing is to be done, -- cgit v1.2.3