don't log "unhandled commands" (all messages are still printed anyway)
This commit is contained in:
parent
d295a0bdc2
commit
2009f7763f
@ -72,8 +72,6 @@ def __unhandled__(cli, prefix, cmd, *args):
|
|||||||
else:
|
else:
|
||||||
log(traceback.format_exc())
|
log(traceback.format_exc())
|
||||||
cli.msg(botconfig.CHANNEL, "An error has occurred and has been logged.")
|
cli.msg(botconfig.CHANNEL, "An error has occurred and has been logged.")
|
||||||
elif botconfig.VERBOSE_MODE or botconfig.DEBUG_MODE:
|
|
||||||
alog('Unhandled command {0}({1})'.format(cmd, [arg.decode('utf_8') for arg in args if isinstance(arg, bytes)]))
|
|
||||||
|
|
||||||
|
|
||||||
COMMANDS = {}
|
COMMANDS = {}
|
||||||
|
@ -18,10 +18,6 @@
|
|||||||
from oyoyo.ircevents import generated_events, protocol_events,\
|
from oyoyo.ircevents import generated_events, protocol_events,\
|
||||||
all_events, numeric_events
|
all_events, numeric_events
|
||||||
|
|
||||||
from tools import logger # external dependency
|
|
||||||
|
|
||||||
log = logger(None, None, None)
|
|
||||||
|
|
||||||
# avoiding regex
|
# avoiding regex
|
||||||
def parse_raw_irc_command(element):
|
def parse_raw_irc_command(element):
|
||||||
"""
|
"""
|
||||||
@ -56,7 +52,7 @@ def parse_raw_irc_command(element):
|
|||||||
try:
|
try:
|
||||||
command = numeric_events[command]
|
command = numeric_events[command]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
log('unknown numeric event {0}'.format(command))
|
pass
|
||||||
command = command.lower()
|
command = command.lower()
|
||||||
if isinstance(command, bytes): command = command.decode("utf_8")
|
if isinstance(command, bytes): command = command.decode("utf_8")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user