mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Fixed bug #900879.
This commit is contained in:
parent
57ec45e728
commit
58decb39a9
@ -91,6 +91,9 @@ def makeNewAlias(name, alias):
|
||||
raise AliasError, 'Can\'t mix $* and optional args (@1, etc.)'
|
||||
if original.count('$*') > 1:
|
||||
raise AliasError, 'There can be only one $* in an alias.'
|
||||
testTokens = callbacks.tokenize(original)
|
||||
if testTokens and isinstance(testTokens[0], list):
|
||||
raise AliasError, 'Commands may not be the result of nesting.'
|
||||
def f(self, irc, msg, args):
|
||||
alias = original.replace('$nick', msg.nick)
|
||||
if '$channel' in original:
|
||||
|
@ -67,6 +67,9 @@ class FunctionsTest(SupyTestCase):
|
||||
|
||||
class AliasTestCase(ChannelPluginTestCase, PluginDocumentation):
|
||||
plugins = ('Alias', 'Filter', 'Utilities')
|
||||
def testNoAliasWithNestedCommandName(self):
|
||||
self.assertError('alias add foo "[bar] baz"')
|
||||
|
||||
def testDoesNotOverwriteCommands(self):
|
||||
self.assertError('alias add alias "echo foo bar baz"')
|
||||
self.assertError('alias add add "echo foo bar baz"')
|
||||
|
Loading…
Reference in New Issue
Block a user