3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +01:00

services_support: fix rejoin-on-kill to the main service bot

Clear the irc.pseudoclient state on kill as the respawning code will check for it first and reuse UIDs even if they don't exist.
This commit is contained in:
James Lu 2017-11-12 10:54:30 -08:00
parent 847854aac3
commit d4cbf1d2af

View File

@ -104,6 +104,8 @@ utils.add_hook(handle_endburst, 'ENDBURST')
def handle_kill(irc, source, command, args): def handle_kill(irc, source, command, args):
"""Handle KILLs to PyLink service bots, respawning them as needed.""" """Handle KILLs to PyLink service bots, respawning them as needed."""
target = args['target'] target = args['target']
if irc.pseudoclient and target == irc.pseudoclient.uid:
irc.pseudoclient = None
userdata = args.get('userdata') userdata = args.get('userdata')
sbot = irc.get_service_bot(target) sbot = irc.get_service_bot(target)
servicename = None servicename = None