diff options
author | Adam <Adam@anope.org> | 2013-02-15 23:18:34 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-02-15 23:18:34 -0500 |
commit | 7be23b7e374d343f60c4b698365719a3aba7f8f2 (patch) | |
tree | 784b6545ee39861118cde78a286dcc831ced5e79 /modules/protocol/inspircd12.cpp | |
parent | d9c18a6072521bb44418830d2ba1cda14389af20 (diff) |
Fix setting modes on botserv bots in channels that have other bots in them on startup
Diffstat (limited to 'modules/protocol/inspircd12.cpp')
-rw-r--r-- | modules/protocol/inspircd12.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp index d00284640..55ab40cd8 100644 --- a/modules/protocol/inspircd12.cpp +++ b/modules/protocol/inspircd12.cpp @@ -235,8 +235,15 @@ class InspIRCd12Proto : public IRCDProto BotInfo *setter = BotInfo::Find(user->nick); for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i) - if (cs.modes.count(ModeManager::ChannelModes[i]->name)) + { + ChannelMode *cm = ModeManager::ChannelModes[i]; + + if (cs.modes.count(cm->name) || cs.modes.count(cm->mchar)) + { c->SetMode(setter, ModeManager::ChannelModes[i], user->GetUID(), false); + cs.modes.insert(cm->name); + } + } } } |