From d4cbf1d2af0f4109ce5473fb913ebe10e5196d7a Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 12 Nov 2017 10:54:30 -0800 Subject: [PATCH] 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. --- coremods/service_support.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coremods/service_support.py b/coremods/service_support.py index c29e073..5ba0350 100644 --- a/coremods/service_support.py +++ b/coremods/service_support.py @@ -104,6 +104,8 @@ utils.add_hook(handle_endburst, 'ENDBURST') def handle_kill(irc, source, command, args): """Handle KILLs to PyLink service bots, respawning them as needed.""" target = args['target'] + if irc.pseudoclient and target == irc.pseudoclient.uid: + irc.pseudoclient = None userdata = args.get('userdata') sbot = irc.get_service_bot(target) servicename = None