From 48e25fcfd24027d45540d8e341cd6daf13de16b9 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 2 Apr 2005 22:42:11 +0000 Subject: Fixed bug number 34, same nick can exist multiple times on a silence list git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@958 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_silence.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp index b6d821bc4..e6cd730ac 100644 --- a/src/modules/m_silence.cpp +++ b/src/modules/m_silence.cpp @@ -95,6 +95,14 @@ void handle_silence(char **parameters, int pcnt, userrec *user) user->Extend(std::string("silence_list"),(char*)sl); } // 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)) + { + WriteServ(user->fd,"952 %s %s :%s is already on your silence list",user->nick, user->nick,nick); + return; + } + } sl->push_back(std::string(nick)); WriteServ(user->fd,"951 %s %s :Added %s!*@* to silence list",user->nick, user->nick,nick); return; -- cgit v1.2.3