]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/mode.cpp
Move the definition of the BanCacheHit constructor into the source file from the...
[user/henk/code/inspircd.git] / src / mode.cpp
index b56c26990a2cc6ddb39e81b60d4d7116ce959c1b..9d24160f65b0bd8a2ba68c33138533aec83301ac 100644 (file)
@@ -693,15 +693,20 @@ bool ModeParser::DelMode(ModeHandler* mh)
        switch (mh->GetModeType())
        {
                case MODETYPE_USER:
-                       for (user_hash::iterator i = ServerInstance->Users->clientlist->begin(); i != ServerInstance->Users->clientlist->end(); )
+               {
+                       const user_hash& users = ServerInstance->Users->GetUsers();
+                       for (user_hash::const_iterator i = users.begin(); i != users.end(); )
                        {
                                User* user = i->second;
                                ++i;
                                mh->RemoveMode(user);
                        }
+               }
                break;
                case MODETYPE_CHANNEL:
-                       for (chan_hash::iterator i = ServerInstance->chanlist->begin(); i != ServerInstance->chanlist->end(); )
+               {
+                       const chan_hash& chans = ServerInstance->GetChans();
+                       for (chan_hash::const_iterator i = chans.begin(); i != chans.end(); )
                        {
                                // The channel may not be in the hash after RemoveMode(), see m_permchannels
                                Channel* chan = i->second;
@@ -718,6 +723,7 @@ bool ModeParser::DelMode(ModeHandler* mh)
                                        stackresult.erase(stackresult.begin() + 1, stackresult.end());
                                }
                        }
+               }
                break;
        }
 
@@ -933,7 +939,6 @@ struct builtin_modes
        ModeChannelOp o;
        ModeChannelVoice v;
 
-       ModeUserWallops uw;
        ModeUserInvisible ui;
        ModeUserOperator uo;
        ModeUserServerNoticeMask us;
@@ -941,7 +946,7 @@ struct builtin_modes
        void init()
        {
                ServiceProvider* modes[] = { &s, &p, &m, &t, &n, &i, &k, &l, &b, &o, &v,
-                                                                        &uw, &ui, &uo, &us };
+                                                                        &ui, &uo, &us };
                ServerInstance->Modules->AddServices(modes, sizeof(modes)/sizeof(ServiceProvider*));
        }
 };