]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_deaf.cpp
Move OnSync{Channel,Network,User} to ServerEventListener.
[user/henk/code/inspircd.git] / src / modules / m_deaf.cpp
index 5c4f7b2b60cb8601cfd7c90542a48d4710e8522e..7cad49d7622c32d050b5260892c917c95df76d62 100644 (file)
@@ -28,7 +28,7 @@ class User_d : public ModeHandler
  public:
        User_d(Module* Creator) : ModeHandler(Creator, "deaf", 'd', PARAM_NONE, MODETYPE_USER) { }
 
-       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string& parameter, bool adding) CXX11_OVERRIDE
        {
                if (adding == dest->IsModeSet(this))
                        return MODEACTION_DENY;
@@ -73,11 +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;
 
-               const UserMembList& ulist = chan->GetUsers();
-               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(i->second->GetAllPrefixChars(), status))
-                               continue;
-
                        /* don't deliver message! */
                        exempt_list.insert(i->first);
                }