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 | |
parent | d9c18a6072521bb44418830d2ba1cda14389af20 (diff) |
Fix setting modes on botserv bots in channels that have other bots in them on startup
Diffstat (limited to 'modules')
-rw-r--r-- | modules/protocol/inspircd12.cpp | 9 | ||||
-rw-r--r-- | modules/pseudoclients/botserv.cpp | 2 |
2 files changed, 9 insertions, 2 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); + } + } } } diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp index fd7f0380e..2c506876a 100644 --- a/modules/pseudoclients/botserv.cpp +++ b/modules/pseudoclients/botserv.cpp @@ -159,7 +159,7 @@ class BotServCore : public Module void OnJoinChannel(User *user, Channel *c) anope_override { - if (c->ci && c->ci->bi) + if (user->server != Me && c->ci && c->ci->bi) { /** * We let the bot join even if it was an ignored user, as if we don't, |