summaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
authorAdam <Adam@drink-coca-cola.info>2010-05-14 20:35:38 -0400
committerAdam <Adam@anope.org>2010-06-18 21:01:53 -0400
commitf049124905bd9f53439293e873003cb027a17b91 (patch)
tree352ed9251fd47055dd770aa2d5eabb20247e4b43 /src/misc.c
parent81a45520a773732c9f46785f27aa1956150775d7 (diff)
Rewrote the hashing system to use std::tr1::unordered_map
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/misc.c b/src/misc.c
index 9b535b1ab..443dec298 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -819,16 +819,17 @@ int nickIsServices(const char *tempnick, int bot)
found++;
else if (Config.s_GlobalNoticer && (stricmp(nick, Config.s_GlobalNoticer) == 0))
found++;
- else if (Config.s_BotServ && bot) {
- BotInfo *bi;
- int i;
- for (i = 0; i < 256; i++) {
- for (bi = botlists[i]; bi; bi = bi->next) {
- ci::string ci_bi_nick(bi->nick.c_str());
- if (ci_bi_nick == nick) {
- found++;
- continue;
- }
+ else if (Config.s_BotServ && bot)
+ {
+ for (botinfo_map::const_iterator it = BotList.begin(); it != BotList.end(); ++it)
+ {
+ BotInfo *bi = it->second;
+
+ ci::string ci_bi_nick(bi->nick.c_str());
+ if (ci_bi_nick == nick)
+ {
+ found++;
+ break;
}
}
}