From 91df762e93212958db487d8517addba1a63a4ddd Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 13 Sep 2009 20:30:47 +0000 Subject: Membership* changes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11697 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_silence.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'src/modules/m_silence.cpp') diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp index 779cb541e..3b0709539 100644 --- a/src/modules/m_silence.cpp +++ b/src/modules/m_silence.cpp @@ -298,30 +298,15 @@ class ModuleSilence : public Module void OnBuildExemptList(MessageType message_type, Channel* chan, User* sender, char status, CUList &exempt_list, const std::string &text) { int public_silence = (message_type == MSG_PRIVMSG ? SILENCE_CHANNEL : SILENCE_CNOTICE); - CUList *ulist; - switch (status) - { - case '@': - ulist = chan->GetOppedUsers(); - break; - case '%': - ulist = chan->GetHalfoppedUsers(); - break; - case '+': - ulist = chan->GetVoicedUsers(); - break; - default: - ulist = chan->GetUsers(); - break; - } + const UserMembList *ulist = chan->GetUsers(); - for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++) + for (UserMembCIter i = ulist->begin(); i != ulist->end(); i++) { if (IS_LOCAL(i->first)) { if (MatchPattern(i->first, sender, public_silence) == MOD_RES_ALLOW) { - exempt_list[i->first] = i->first->nick; + exempt_list.insert(i->first); } } } -- cgit v1.2.3