mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +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))
|
irc.queueMsg(ircmsgs.privmsg(target, s))
|
||||||
raise callbacks.CannotNest
|
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
|
Class = MiscCommands
|
||||||
|
@ -121,6 +121,10 @@ class MiscCommandsTestCase(ChannelPluginTestCase, PluginDocumentation):
|
|||||||
self.assertRegexp('echo %s' % ('abc'*300), 'more')
|
self.assertRegexp('echo %s' % ('abc'*300), 'more')
|
||||||
self.assertRegexp('more', 'more')
|
self.assertRegexp('more', 'more')
|
||||||
self.assertNotRegexp('more', 'more')
|
self.assertNotRegexp('more', 'more')
|
||||||
|
|
||||||
|
def testPrivate(self):
|
||||||
|
m = self.getMsg('private [list]')
|
||||||
|
self.failIf(ircutils.isChannel(m.args[0]))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user