summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-02 22:42:11 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-02 22:42:11 +0000
commit48e25fcfd24027d45540d8e341cd6daf13de16b9 (patch)
tree84015903279683c03f70cb661316c53d872d46b8 /src
parent208caa7d759b82d7a77d00108e6dd6d8c0627ba8 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_silence.cpp8
1 files changed, 8 insertions, 0 deletions
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;