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

core: log which plugin is being called when calling hooks

This commit is contained in:
James Lu 2015-09-26 09:55:44 -07:00
parent 0378fcca1d
commit 034731ab1e

View File

@ -266,7 +266,8 @@ class Irc():
# Iterate over hooked functions, catching errors accordingly
for hook_func in world.command_hooks[hook_cmd]:
try:
log.debug('(%s) Calling function %s', self.name, hook_func)
log.debug('(%s) Calling hook function %s from plugin "%s"', self.name,
hook_func, hook_func.__module__)
hook_func(self, numeric, command, parsed_args)
except Exception:
# We don't want plugins to crash our servers...