X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_silence.cpp;h=c423506a0c5338aebf68c8b2198b6acaa15772ef;hb=d70ae11ab22d10e40cae525ff28022e596a7c6f0;hp=e38638cd073c6156aee7cf68f56f6032812391dd;hpb=eb4229deed0281ae566ef7e55a144e5d3183a4b2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp index e38638cd0..c423506a0 100644 --- a/src/modules/m_silence.cpp +++ b/src/modules/m_silence.cpp @@ -14,6 +14,8 @@ * --------------------------------------------------- */ +using namespace std; + #include #include #include @@ -21,6 +23,7 @@ #include "channels.h" #include "modules.h" #include "helperfuncs.h" +#include "hashcomp.h" /* $ModDesc: Provides support for the /SILENCE command */ @@ -66,7 +69,9 @@ void handle_silence(char **parameters, int pcnt, userrec *user) for (silencelist::iterator i = sl->begin(); i != sl->end(); i++) { // search through for the item - if (!strcasecmp(i->c_str(),nick)) + irc::string listitem = i->c_str(); + irc::string target = nick; + if (listitem == target) { sl->erase(i); WriteServ(user->fd,"950 %s %s :Removed %s!*@* from silence list",user->nick, user->nick,nick); @@ -98,7 +103,9 @@ void handle_silence(char **parameters, int pcnt, userrec *user) // add the nick to it -- silence only takes nicks for some reason even though its list shows masks for (silencelist::iterator n = sl->begin(); n != sl->end(); n++) { - if (!strcasecmp(n->c_str(),nick)) + irc::string listitem = n->c_str(); + irc::string target = nick; + if (listitem == target) { WriteServ(user->fd,"952 %s %s :%s is already on your silence list",user->nick, user->nick,nick); return; @@ -156,7 +163,9 @@ class ModuleSilence : public Module { for (silencelist::const_iterator c = sl->begin(); c != sl->end(); c++) { - if (!strcasecmp(c->c_str(),user->nick)) + irc::string listitem = c->c_str(); + irc::string target = user->nick; + if (listitem == target) { return 1; } @@ -176,7 +185,9 @@ class ModuleSilence : public Module { for (silencelist::const_iterator c = sl->begin(); c != sl->end(); c++) { - if (!strcasecmp(c->c_str(),user->nick)) + irc::string listitem = c->c_str(); + irc::string target = user->nick; + if (listitem == target) { return 1; }