diff options
| author | Adam <Adam@anope.org> | 2013-04-07 23:46:44 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2013-04-07 23:46:44 -0500 |
| commit | fb7fef7a849342ab8463743497e781c5c3e6ae88 (patch) | |
| tree | 5d230a68b6eed70c7b4f718410dd62fea779654c /src/config.cpp | |
| parent | 36602224b8b1a11326a224779d16bcb12f0ed532 (diff) | |
Optimizations of much of the more commonly used code
Diffstat (limited to 'src/config.cpp')
| -rw-r--r-- | src/config.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/config.cpp b/src/config.cpp index 1c2aae988..4d1267f23 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -137,6 +137,7 @@ ServerConfig::ServerConfig() Log() << "Unknown casemap " << this->CaseMap << " - casemap not changed"; } } + Anope::CaseMapRebuild(); if (this->SessionIPv4CIDR > 32 || this->SessionIPv6CIDR > 128) throw ConfigException("Session CIDR value out of range"); @@ -894,12 +895,10 @@ static bool DoServices(ServerConfig *config, const Anope::string &, const Anope: continue; // Can't happen /* Remove all existing modes */ - for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i) - { - ChannelMode *cm = ModeManager::ChannelModes[i]; - if (cm && cm->type == MODE_STATUS) - c->RemoveMode(bi, cm, bi->GetUID()); - } + ChanUserContainer *cu = c->FindUser(bi); + if (cu != NULL) + for (size_t i = 0; i < cu->status.Modes().length(); ++i) + c->RemoveMode(bi, ModeManager::FindChannelModeByChar(cu->status.Modes()[i]), bi->GetUID()); /* Set the new modes */ for (unsigned j = 0; j < want_modes.length(); ++j) { |
