mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-18 16:39:24 +01:00
Prevent nesting of Misc.tell
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
parent
d1df9e8306
commit
f0233c370f
@ -471,6 +471,8 @@ class Misc(callbacks.Plugin):
|
||||
Tells the <nick> whatever <text> is. Use nested commands to your
|
||||
benefit here.
|
||||
"""
|
||||
if irc.nested:
|
||||
irc.error('This command cannot be nested.', Raise=True)
|
||||
if target.lower() == 'me':
|
||||
target = msg.nick
|
||||
if ircutils.isChannel(target):
|
||||
|
@ -148,6 +148,9 @@ class MiscTestCase(ChannelPluginTestCase):
|
||||
m = self.getMsg('tell me you love me')
|
||||
self.failUnless(m.args[0] == self.nick)
|
||||
|
||||
def testNoNestedTell(self):
|
||||
self.assertRegexp('echo [tell %s foo]' % self.nick, 'nested')
|
||||
|
||||
def testTellDoesNotPropogateAction(self):
|
||||
m = self.getMsg('tell foo [action bar]')
|
||||
self.failIf(ircmsgs.isAction(m))
|
||||
|
Loading…
Reference in New Issue
Block a user