diff --git a/plugins/Misc/plugin.py b/plugins/Misc/plugin.py index b95a84565..66e072c24 100644 --- a/plugins/Misc/plugin.py +++ b/plugins/Misc/plugin.py @@ -471,6 +471,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 7105d9414..985f001a1 100644 --- a/plugins/Misc/test.py +++ b/plugins/Misc/test.py @@ -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))