diff --git a/src/MiscCommands.py b/src/MiscCommands.py index e7b7a2777..2b8132cdf 100755 --- a/src/MiscCommands.py +++ b/src/MiscCommands.py @@ -357,6 +357,15 @@ class MiscCommands(callbacks.Privmsg): irc.queueMsg(ircmsgs.privmsg(target, s)) raise callbacks.CannotNest + def private(self, irc, msg, args): + """ + + Replies with in private. Use nested commands to your benefit + here. + """ + text = privmsgs.getArgs(args) + irc.reply(msg, text, private=True) + Class = MiscCommands diff --git a/test/test_MiscCommands.py b/test/test_MiscCommands.py index 5b3e34fb5..d870c5643 100644 --- a/test/test_MiscCommands.py +++ b/test/test_MiscCommands.py @@ -121,6 +121,10 @@ class MiscCommandsTestCase(ChannelPluginTestCase, PluginDocumentation): self.assertRegexp('echo %s' % ('abc'*300), 'more') self.assertRegexp('more', 'more') self.assertNotRegexp('more', 'more') + + def testPrivate(self): + m = self.getMsg('private [list]') + self.failIf(ircutils.isChannel(m.args[0]))