From 7be23b7e374d343f60c4b698365719a3aba7f8f2 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 15 Feb 2013 23:18:34 -0500 Subject: Fix setting modes on botserv bots in channels that have other bots in them on startup --- modules/protocol/inspircd12.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'modules/protocol') 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); + } + } } } -- cgit