mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Added 'private' command, to reply in private.
This commit is contained in:
parent
1e8f8f634f
commit
baf5da1855
@ -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
|
||||
|
@ -122,6 +122,10 @@ class MiscCommandsTestCase(ChannelPluginTestCase, PluginDocumentation):
|
||||
self.assertRegexp('more', 'more')
|
||||
self.assertNotRegexp('more', 'more')
|
||||
|
||||
def testPrivate(self):
|
||||
m = self.getMsg('private [list]')
|
||||
self.failIf(ircutils.isChannel(m.args[0]))
|
||||
|
||||
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||
|
Loading…
Reference in New Issue
Block a user