diff --git a/plugins/Misc/plugin.py b/plugins/Misc/plugin.py index 702a70b3b..4ed95f50d 100644 --- a/plugins/Misc/plugin.py +++ b/plugins/Misc/plugin.py @@ -381,6 +381,8 @@ class Misc(callbacks.Plugin): Tells the whatever 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): diff --git a/plugins/Misc/test.py b/plugins/Misc/test.py index bf7948dbd..1f379263b 100644 --- a/plugins/Misc/test.py +++ b/plugins/Misc/test.py @@ -142,6 +142,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))