X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmode.cpp;h=9d24160f65b0bd8a2ba68c33138533aec83301ac;hb=9f27390382f8c341e59731fb4c026c93ef4fde4b;hp=b56c26990a2cc6ddb39e81b60d4d7116ce959c1b;hpb=5a64433015f5a25af133a136468093a140595bc5;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/mode.cpp b/src/mode.cpp index b56c26990..9d24160f6 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -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*)); } };