mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
Fix for bug committed last night.
This commit is contained in:
parent
b7fb78abed
commit
b9524115b0
@ -60,7 +60,10 @@ class Misc(callbacks.Privmsg):
|
|||||||
command = tokens and tokens[0] or ''
|
command = tokens and tokens[0] or ''
|
||||||
irc.error('%r is not a valid command.' % command)
|
irc.error('%r is not a valid command.' % command)
|
||||||
else:
|
else:
|
||||||
self.log.info('Not replying to %s, not a command.' % tokens[0])
|
if tokens:
|
||||||
|
# echo [] will get us an empty token set, but there's no need
|
||||||
|
# to log this in that case anyway, it being a nested command.
|
||||||
|
self.log.info('Not replying to %s, not a command.' % tokens[0])
|
||||||
if not isinstance(irc.irc, irclib.Irc):
|
if not isinstance(irc.irc, irclib.Irc):
|
||||||
irc.reply('[%s]' % ' '.join(tokens))
|
irc.reply('[%s]' % ' '.join(tokens))
|
||||||
|
|
||||||
|
@ -161,6 +161,9 @@ class MiscTestCase(ChannelPluginTestCase):
|
|||||||
self.assertRegexp('more', 'more')
|
self.assertRegexp('more', 'more')
|
||||||
self.assertNotRegexp('more', 'more')
|
self.assertNotRegexp('more', 'more')
|
||||||
|
|
||||||
|
def testInvalidCommand(self):
|
||||||
|
self.assertResponse('echo []', '[]')
|
||||||
|
|
||||||
def testMoreIsCaseInsensitive(self):
|
def testMoreIsCaseInsensitive(self):
|
||||||
self.assertNotError('echo %s' % ('abc'*2000))
|
self.assertNotError('echo %s' % ('abc'*2000))
|
||||||
self.assertNotError('more')
|
self.assertNotError('more')
|
||||||
|
Loading…
Reference in New Issue
Block a user