3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-02-03 08:04:07 +01:00

automode: join modebot client on setacc

Reported by kevin via IRC.
This commit is contained in:
James Lu 2016-08-31 22:23:44 -07:00
parent a25a6b7e8d
commit 9b38ca7d68

View File

@ -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)