diff options
author | Adam <Adam@anope.org> | 2015-09-06 16:27:07 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2015-09-06 16:48:25 -0400 |
commit | 263dc290d296af2fcdf7f8a9f04735935e9c2580 (patch) | |
tree | 2b74e5e463afab1ecc4a6135152c9e3c5b38131e /modules/protocol/hybrid.cpp | |
parent | ad3b14c5a20353e65a1b96ee2309a904bf4d5329 (diff) |
Fix some service bot/botinfo mismatches
Diffstat (limited to 'modules/protocol/hybrid.cpp')
-rw-r--r-- | modules/protocol/hybrid.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
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<ServiceBot *>(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<ServiceBot *>(u); + if (bi->introduced) + return bi; + } + } return NULL; } |