mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-20 07:20:59 +01:00
Slightly more consistent logging format...
This commit is contained in:
parent
7011aa3b36
commit
b87e34efa2
@ -236,15 +236,17 @@ class Irc():
|
|||||||
if command in hook_map:
|
if command in hook_map:
|
||||||
hook_cmd = hook_map[command]
|
hook_cmd = hook_map[command]
|
||||||
hook_cmd = parsed_args.get('parse_as') or hook_cmd
|
hook_cmd = parsed_args.get('parse_as') or hook_cmd
|
||||||
log.debug('Parsed args %r received from %s handler (calling hook %s)', parsed_args, command, hook_cmd)
|
log.debug('(%s) Parsed args %r received from %s handler (calling hook %s)',
|
||||||
|
self.name, parsed_args, command, hook_cmd)
|
||||||
# Iterate over hooked functions, catching errors accordingly
|
# Iterate over hooked functions, catching errors accordingly
|
||||||
for hook_func in world.command_hooks[hook_cmd]:
|
for hook_func in world.command_hooks[hook_cmd]:
|
||||||
try:
|
try:
|
||||||
log.debug('Calling function %s', hook_func)
|
log.debug('(%s) Calling function %s', self.name, hook_func)
|
||||||
hook_func(self, numeric, command, parsed_args)
|
hook_func(self, numeric, command, parsed_args)
|
||||||
except Exception:
|
except Exception:
|
||||||
# We don't want plugins to crash our servers...
|
# We don't want plugins to crash our servers...
|
||||||
log.exception('Unhandled exception caught in %r' % hook_func)
|
log.exception('(%s) Unhandled exception caught in %r',
|
||||||
|
self.name, hook_func)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
def send(self, data):
|
def send(self, data):
|
||||||
|
@ -99,7 +99,7 @@ class TS6Protocol(TS6BaseProtocol):
|
|||||||
self.irc.channels[channel].modes.clear()
|
self.irc.channels[channel].modes.clear()
|
||||||
for p in self.irc.channels[channel].prefixmodes.values():
|
for p in self.irc.channels[channel].prefixmodes.values():
|
||||||
p.clear()
|
p.clear()
|
||||||
log.debug("sending SJOIN to %s%s with ts %s (that's %r)", channel, self.irc.name, ts,
|
log.debug("(%s) sending SJOIN to %s with ts %s (that's %r)", self.irc.name, channel, ts,
|
||||||
time.strftime("%c", time.localtime(ts)))
|
time.strftime("%c", time.localtime(ts)))
|
||||||
modes = [m for m in self.irc.channels[channel].modes if m[0] not in self.irc.cmodes['*A']]
|
modes = [m for m in self.irc.channels[channel].modes if m[0] not in self.irc.cmodes['*A']]
|
||||||
changedmodes = []
|
changedmodes = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user