diff options
Diffstat (limited to 'src/chanserv.cpp')
| -rw-r--r-- | src/chanserv.cpp | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/src/chanserv.cpp b/src/chanserv.cpp index f18c919cc..fd7fb88f9 100644 --- a/src/chanserv.cpp +++ b/src/chanserv.cpp @@ -22,89 +22,6 @@ registered_channel_map RegisteredChannelList; /*************************************************************************/ -/* Check the current modes on a channel; if they conflict with a mode lock, - * fix them. - */ - -void check_modes(Channel *c) -{ - if (!c) - { - Log() << "check_modes called with NULL values"; - return; - } - - if (c->bouncy_modes) - return; - - /* Check for mode bouncing */ - if (c->server_modecount >= 3 && c->chanserv_modecount >= 3) - { - Log() << "Warning: unable to set modes on channel " << c->name << ". Are your servers' U:lines configured correctly?"; - c->bouncy_modes = 1; - return; - } - - if (c->chanserv_modetime != Anope::CurTime) - { - c->chanserv_modecount = 0; - c->chanserv_modetime = Anope::CurTime; - } - c->chanserv_modecount++; - - /* Check if the channel is registered; if not remove mode -r */ - ChannelInfo *ci = c->ci; - if (!ci) - { - if (c->HasMode(CMODE_REGISTERED)) - c->RemoveMode(NULL, CMODE_REGISTERED); - return; - } - - for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it) - { - const ModeLock &ml = it->second; - ChannelMode *cm = ModeManager::FindChannelModeByName(ml.name); - if (!cm) - continue; - - if (cm->Type == MODE_REGULAR) - { - if (!c->HasMode(cm->Name) && ml.set) - c->SetMode(NULL, cm); - else if (c->HasMode(cm->Name) && !ml.set) - c->RemoveMode(NULL, cm); - } - else if (cm->Type == MODE_PARAM) - { - Anope::string param; - c->GetParam(cm->Name, param); - - /* If the channel doesnt have the mode, or it does and it isn't set correctly */ - if (ml.set) - { - if (!c->HasMode(cm->Name) || (!param.empty() && !ml.param.empty() && !param.equals_cs(ml.param))) - c->SetMode(NULL, cm, ml.param); - } - else - { - if (c->HasMode(cm->Name)) - c->RemoveMode(NULL, cm); - } - - } - else if (cm->Type == MODE_LIST) - { - if (ml.set) - c->SetMode(NULL, cm, ml.param); - else - c->RemoveMode(NULL, cm, ml.param); - } - } -} - -/*************************************************************************/ - ChannelInfo *cs_findchan(const Anope::string &chan) { FOREACH_MOD(I_OnFindChan, OnFindChan(chan)); |
