3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

services_support: honour joinmodes settings on kick-rejoin

This commit is contained in:
James Lu 2016-09-24 12:22:12 -07:00
parent 7d20b70d33
commit 1c60ad7251

View File

@ -101,8 +101,9 @@ def handle_kick(irc, source, command, args):
"""Handle KICKs to the PyLink service bots, rejoining channels as needed."""
kicked = args['target']
channel = args['channel']
if irc.isServiceBot(kicked):
irc.proto.join(kicked, channel)
sbot = irc.isServiceBot(kicked)
if sbot:
sbot.join(irc, channel)
irc.callHooks([irc.sid, 'PYLINK_SERVICE_JOIN', {'channel': channel, 'users': [kicked]}])
utils.add_hook(handle_kick, 'KICK')