From baf5da1855ba7e9af0fcabb16d4ea885fe7011b0 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 3 Oct 2003 15:42:11 +0000 Subject: [PATCH] Added 'private' command, to reply in private. --- src/MiscCommands.py | 9 +++++++++ test/test_MiscCommands.py | 4 ++++ 2 files changed, 13 insertions(+) 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]))