mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-02 15:44:06 +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)
|
||||
|
||||
if ctcp_command in SUPPORTED_COMMANDS:
|
||||
log.info('(%s) Received CTCP %s from %s',
|
||||
irc.name, ctcp_command, irc.get_hostmask(source))
|
||||
log.info('(%s) Received CTCP %s from %s to %s',
|
||||
irc.name, ctcp_command, irc.get_hostmask(source),
|
||||
irc.get_friendly_name(target))
|
||||
|
||||
# Call the helper function and display its result.
|
||||
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
|
||||
else:
|
||||
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
|
||||
|
||||
utils.add_hook(handle_ctcp, 'PRIVMSG', priority=200)
|
||||
|
Loading…
Reference in New Issue
Block a user