From 263dc290d296af2fcdf7f8a9f04735935e9c2580 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 6 Sep 2015 16:27:07 -0400 Subject: Fix some service bot/botinfo mismatches --- modules/protocol/hybrid.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'modules/protocol') diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index 1e63ed448..da412623a 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -22,9 +22,16 @@ class HybridProto : public IRCDProto if (bi && bi->introduced) return bi; - for (ServiceBot *bi2 : Serialize::GetObjects(botinfo)) - if (bi2->introduced) - return bi2; + for (user_map::const_iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) + { + User *u = it->second; + if (u->type == UserType::BOT) + { + bi = anope_dynamic_static_cast(u); + if (bi->introduced) + return bi; + } + } return NULL; } -- cgit