mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
ServiceBot: ignore invalid commands beginning with \x01 (CTCP)
This commit is contained in:
parent
f555a484f9
commit
d362063e8a
4
utils.py
4
utils.py
@ -212,7 +212,9 @@ class ServiceBot():
|
|||||||
cmd = cmd_args[0].lower()
|
cmd = cmd_args[0].lower()
|
||||||
cmd_args = cmd_args[1:]
|
cmd_args = cmd_args[1:]
|
||||||
if cmd not in self.commands:
|
if cmd not in self.commands:
|
||||||
self.reply(irc, 'Error: Unknown command %r.' % cmd)
|
if not cmd.startswith('\x01'):
|
||||||
|
# Ignore invalid command errors from CTCPs.
|
||||||
|
self.reply(irc, 'Error: Unknown command %r.' % cmd)
|
||||||
log.info('(%s/%s) Received unknown command %r from %s', irc.name, self.name, cmd, irc.getHostmask(source))
|
log.info('(%s/%s) Received unknown command %r from %s', irc.name, self.name, cmd, irc.getHostmask(source))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user