3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-26 04:32:51 +01:00

opercmds: format KILL reasons properly in kill()

This commit is contained in:
James Lu 2016-07-06 22:36:06 -07:00
parent e0f050c195
commit ec0f2714e2

View File

@ -179,6 +179,10 @@ def kill(irc, source, args):
return return
irc.proto.kill(sender, targetu, reason) 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, irc.callHooks([sender, 'CHANCMDS_KILL', {'target': targetu, 'text': reason,
'userdata': userdata, 'parse_as': 'KILL'}]) 'userdata': userdata, 'parse_as': 'KILL'}])