]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_deaf.cpp
Merge pull request #1337 from SaberUK/master+merge
[user/henk/code/inspircd.git] / src / modules / m_deaf.cpp
index ce6571b8c87fc2d155a7ee8b4f4c49f17a839c84..88919e91b072540184fe3637360109fd95537bf1 100644 (file)
@@ -66,7 +66,6 @@ class ModuleDeaf : public Module
                        return MOD_RES_PASSTHRU;
 
                Channel* chan = static_cast<Channel*>(dest);
-               const UserMembList *ulist = chan->GetUsers();
                bool is_bypasschar = (deaf_bypasschars.find(text[0]) != std::string::npos);
                bool is_bypasschar_uline = (deaf_bypasschars_uline.find(text[0]) != std::string::npos);
 
@@ -74,10 +73,11 @@ class ModuleDeaf : public Module
                 * If we have no bypasschars_uline in config, and this is a bypasschar (regular)
                 * Than it is obviously going to get through +d, no build required
                 */
-               if (!deaf_bypasschars_uline.empty() && is_bypasschar)
+               if (deaf_bypasschars_uline.empty() && is_bypasschar)
                        return MOD_RES_PASSTHRU;
 
-               for (UserMembCIter i = ulist->begin(); i != ulist->end(); i++)
+               const Channel::MemberMap& ulist = chan->GetUsers();
+               for (Channel::MemberMap::const_iterator i = ulist.begin(); i != ulist.end(); ++i)
                {
                        /* not +d ? */
                        if (!i->first->IsModeSet(m1))
@@ -94,9 +94,6 @@ class ModuleDeaf : public Module
                        if (is_bypasschar && !is_a_uline)
                                continue; /* deliver message */
 
-                       if (status && !strchr(chan->GetAllPrefixChars(i->first), status))
-                               continue;
-
                        /* don't deliver message! */
                        exempt_list.insert(i->first);
                }