mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-24 02:54:05 +01:00
Conditional: Do not use noReply() after running the command.
As the command already calls reply() or noReply(), calling noReply()
there had disastrous effects:
* if reply() was called, noReply() erases the argument
* if noReply() was called, calling noReply() a second time erases **the next argument** (because the current argument was already erased).
This was 'caused' by the change of behavior of noReply() in 543edccd41
.
This commit is contained in:
parent
965dcc293d
commit
bee98f6711
@ -55,7 +55,15 @@ class FunctionsTest(SupyTestCase):
|
||||
|
||||
class AkaChannelTestCase(ChannelPluginTestCase):
|
||||
plugins = ('Aka', 'Conditional', 'Filter', 'Math', 'Utilities',
|
||||
'Format', 'Reply')
|
||||
'Format', 'Reply', 'String')
|
||||
|
||||
def testHistsearch(self):
|
||||
self.assertNotError(
|
||||
r'aka add histsearch "last --from [cif true '
|
||||
r'\"echo test\" \"echo test\"] '
|
||||
r'--regexp [concat \"m/$1/\" [re s/g// \"@2\"]]"')
|
||||
self.assertResponse('echo foo', 'foo')
|
||||
self.assertResponse('histsearch .*', '@echo foo')
|
||||
|
||||
def testDoesNotOverwriteCommands(self):
|
||||
# We don't have dispatcher commands anymore
|
||||
|
@ -83,7 +83,6 @@ class Conditional(callbacks.Plugin):
|
||||
self._runCommandFunction(irc, msg, ifcommand)
|
||||
else:
|
||||
self._runCommandFunction(irc, msg, elsecommand)
|
||||
irc.noReply()
|
||||
cif = wrap(cif, [boolean_or_int, 'something', 'something'])
|
||||
|
||||
@internationalizeDocstring
|
||||
|
Loading…
Reference in New Issue
Block a user