From c792c7f62df41c48d0d813a809e5415cbefa38b2 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 13 Nov 2010 15:20:56 -0500 Subject: Switched the system for storing users, channels, and sesions to a patricia tree from STL's unordered_map, which was giving horrible performance. --- src/misc.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/misc.cpp') diff --git a/src/misc.cpp b/src/misc.cpp index 3db15962b..7e02cc072 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -618,16 +618,8 @@ bool nickIsServices(const Anope::string &tempnick, bool bot) return true; else if (!Config->s_GlobalNoticer.empty() && nick.equals_ci(Config->s_GlobalNoticer)) return true; - else if (!Config->s_BotServ.empty() && bot) - { - for (botinfo_map::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it) - { - BotInfo *bi = it->second; - - if (nick.equals_ci(bi->nick)) - return true; - } - } + else if (!Config->s_BotServ.empty() && bot && BotListByNick.find(nick)) + return true; return false; } -- cgit