Added 'private' command, to reply in private.

This commit is contained in:
Jeremy Fincher 2003-10-03 15:42:11 +00:00
parent 1e8f8f634f
commit baf5da1855
2 changed files with 13 additions and 0 deletions

View File

@ -357,6 +357,15 @@ class MiscCommands(callbacks.Privmsg):
irc.queueMsg(ircmsgs.privmsg(target, s))
raise callbacks.CannotNest
def private(self, irc, msg, args):
"""<text>
Replies with <text> in private. Use nested commands to your benefit
here.
"""
text = privmsgs.getArgs(args)
irc.reply(msg, text, private=True)
Class = MiscCommands

View File

@ -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]))