From ec0f2714e262630a4d8c5deb0fbd76641ad63fda Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 6 Jul 2016 22:36:06 -0700 Subject: [PATCH] opercmds: format KILL reasons properly in kill() --- plugins/opercmds.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/opercmds.py b/plugins/opercmds.py index 2e28b66..5b0f6eb 100644 --- a/plugins/opercmds.py +++ b/plugins/opercmds.py @@ -179,6 +179,10 @@ def kill(irc, source, args): return irc.proto.kill(sender, targetu, reason) + + # Format the kill reason properly in hooks. + reason = "Killed (%s (%s))" % (irc.getFriendlyName(sender), reason) + irc.callHooks([sender, 'CHANCMDS_KILL', {'target': targetu, 'text': reason, 'userdata': userdata, 'parse_as': 'KILL'}])