mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-03 08:04:07 +01:00
ctcp: log the service bot receiving CTCP messages
This commit is contained in:
parent
e68db3689d
commit
c40250330d
@ -30,8 +30,9 @@ def handle_ctcp(irc, source, command, args):
|
|||||||
irc.name, ctcp_command, data)
|
irc.name, ctcp_command, data)
|
||||||
|
|
||||||
if ctcp_command in SUPPORTED_COMMANDS:
|
if ctcp_command in SUPPORTED_COMMANDS:
|
||||||
log.info('(%s) Received CTCP %s from %s',
|
log.info('(%s) Received CTCP %s from %s to %s',
|
||||||
irc.name, ctcp_command, irc.get_hostmask(source))
|
irc.name, ctcp_command, irc.get_hostmask(source),
|
||||||
|
irc.get_friendly_name(target))
|
||||||
|
|
||||||
# Call the helper function and display its result.
|
# Call the helper function and display its result.
|
||||||
result = SUPPORTED_COMMANDS[ctcp_command](irc, source, ctcp_command, data)
|
result = SUPPORTED_COMMANDS[ctcp_command](irc, source, ctcp_command, data)
|
||||||
@ -42,7 +43,8 @@ def handle_ctcp(irc, source, command, args):
|
|||||||
return False # Block this message from reaching the general command handler
|
return False # Block this message from reaching the general command handler
|
||||||
else:
|
else:
|
||||||
log.info('(%s) Received unknown CTCP %s from %s',
|
log.info('(%s) Received unknown CTCP %s from %s',
|
||||||
irc.name, ctcp_command, irc.get_hostmask(source))
|
irc.name, ctcp_command, irc.get_hostmask(source),
|
||||||
|
irc.get_friendly_name(target))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
utils.add_hook(handle_ctcp, 'PRIVMSG', priority=200)
|
utils.add_hook(handle_ctcp, 'PRIVMSG', priority=200)
|
||||||
|
Loading…
Reference in New Issue
Block a user