1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 06:53:13 +02:00

Optimizations of much of the more commonly used code

This commit is contained in:
Adam
2013-04-07 23:46:44 -05:00
parent 36602224b8
commit fb7fef7a84
64 changed files with 772 additions and 806 deletions
+5 -6
View File
@@ -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)
{