summaryrefslogtreecommitdiff
path: root/modules/protocol/hybrid.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2015-09-06 16:27:07 -0400
committerAdam <Adam@anope.org>2015-09-06 16:48:25 -0400
commit263dc290d296af2fcdf7f8a9f04735935e9c2580 (patch)
tree2b74e5e463afab1ecc4a6135152c9e3c5b38131e /modules/protocol/hybrid.cpp
parentad3b14c5a20353e65a1b96ee2309a904bf4d5329 (diff)
Fix some service bot/botinfo mismatches
Diffstat (limited to 'modules/protocol/hybrid.cpp')
-rw-r--r--modules/protocol/hybrid.cpp13
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;
}