From 9b38ca7d6830287c61857db2f6680347d226451f Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 31 Aug 2016 22:23:44 -0700 Subject: [PATCH] automode: join modebot client on setacc Reported by kevin via IRC. --- plugins/automode.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/automode.py b/plugins/automode.py index c19186c..46fd864 100644 --- a/plugins/automode.py +++ b/plugins/automode.py @@ -232,6 +232,12 @@ def setacc(irc, source, args): log.info('(%s) %s set modes +%s for %s on %s', irc.name, irc.getHostmask(source), modes, mask, channel) reply(irc, "Done. \x02%s\x02 now has modes \x02%s\x02 in \x02%s\x02." % (mask, modes, channel)) + # Join the Automode bot to the channel if not explicitly told to. + modebot.extra_channels[irc.name].add(channel) + mbuid = modebot.uids.get(irc.name) + if mbuid and mbuid not in irc.channels[channel].users: + irc.proto.join(mbuid, channel) + modebot.add_cmd(setacc, 'setaccess') modebot.add_cmd(setacc, 'set') modebot.add_cmd(setacc, featured=True)