summaryrefslogtreecommitdiff
path: root/src/operserv.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-11-13 15:20:56 -0500
committerAdam <Adam@anope.org>2010-12-12 19:33:58 -0500
commitc792c7f62df41c48d0d813a809e5415cbefa38b2 (patch)
treef7778d83dba9092bdd04ec6cf568c427e34e3218 /src/operserv.cpp
parente5127603642d3f04a21480697bdf59517775fd8b (diff)
Switched the system for storing users, channels, and sesions to a patricia
tree from STL's unordered_map, which was giving horrible performance.
Diffstat (limited to 'src/operserv.cpp')
-rw-r--r--src/operserv.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/operserv.cpp b/src/operserv.cpp
index 2d509f25f..5f6f8c2be 100644
--- a/src/operserv.cpp
+++ b/src/operserv.cpp
@@ -571,9 +571,9 @@ XLine *SNLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
{
Anope::string rreason = "G-Lined: " + reason;
- for (user_map::const_iterator it = UserListByNick.begin(), it_end = UserListByNick.end(); it != it_end; )
+ for (patricia_tree<User>::const_iterator it = UserListByNick.begin(), it_end = UserListByNick.end(); it != it_end;)
{
- User *user = it->second;
+ User *user = *it;
++it;
if (!is_oper(user) && Anope::Match(user->realname, x->Mask))
@@ -672,9 +672,9 @@ XLine *SQLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
}
else
{
- for (user_map::const_iterator it = UserListByNick.begin(), it_end = UserListByNick.end(); it != it_end; )
+ for (patricia_tree<User>::const_iterator it = UserListByNick.begin(), it_end = UserListByNick.end(); it != it_end;)
{
- User *user = it->second;
+ User *user = *it;
++it;
if (!is_oper(user) && Anope::Match(user->nick, x->Mask))