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

services_support: log the reason as well when a service bot is killed

This commit is contained in:
James Lu 2017-08-02 22:14:57 +08:00
parent d42eb82b62
commit f15f27168a

View File

@ -113,8 +113,8 @@ def handle_kill(irc, source, command, args):
elif sbot: # Or their service bot instance
servicename = sbot.name
if servicename:
log.info('(%s) Received kill to service %s (%s) from %s.', irc.name, servicename,
userdata.nick if userdata else irc.users[target].nick, irc.get_hostmask(source))
log.info('(%s) Received kill to service %r (nick: %r) from %s (reason: %r).', irc.name, servicename,
userdata.nick if userdata else irc.users[target].nick, irc.get_hostmask(source), args.get('text'))
spawn_service(irc, source, command, {'name': servicename})
utils.add_hook(handle_kill, 'KILL')