mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
Misc: Add command @noticetell to replace “@notice [tell ]” which is no longer possible since f0233c37
.
This commit is contained in:
parent
43e1b55506
commit
9457f4dbe7
@ -507,13 +507,7 @@ class Misc(callbacks.Plugin):
|
||||
'regexp': 'regexpMatcher',})])
|
||||
|
||||
|
||||
@internationalizeDocstring
|
||||
def tell(self, irc, msg, args, target, text):
|
||||
"""<nick> <text>
|
||||
|
||||
Tells the <nick> whatever <text> is. Use nested commands to your
|
||||
benefit here.
|
||||
"""
|
||||
def _tell(self, irc, msg, args, target, text, notice):
|
||||
if irc.nested:
|
||||
irc.error('This command cannot be nested.', Raise=True)
|
||||
if target.lower() == 'me':
|
||||
@ -536,9 +530,28 @@ class Misc(callbacks.Plugin):
|
||||
text = '* %s %s' % (irc.nick, text)
|
||||
s = _('%s wants me to tell you: %s') % (msg.nick, text)
|
||||
irc.replySuccess()
|
||||
irc.reply(s, to=target, private=True)
|
||||
irc.reply(s, to=target, private=True, notice=notice)
|
||||
|
||||
@internationalizeDocstring
|
||||
def tell(self, *args):
|
||||
"""<nick> <text>
|
||||
|
||||
Tells the <nick> whatever <text> is. Use nested commands to your
|
||||
benefit here.
|
||||
"""
|
||||
self._tell(*args, notice=False)
|
||||
tell = wrap(tell, ['something', 'text'])
|
||||
|
||||
@internationalizeDocstring
|
||||
def noticetell(self, *args):
|
||||
"""<nick> <text>
|
||||
|
||||
Tells the <nick> whatever <text> is, in a notice. Use nested
|
||||
commands to your benefit here.
|
||||
"""
|
||||
self._tell(*args, notice=True)
|
||||
noticetell = wrap(noticetell, ['something', 'text'])
|
||||
|
||||
@internationalizeDocstring
|
||||
def ping(self, irc, msg, args):
|
||||
"""takes no arguments
|
||||
|
Loading…
Reference in New Issue
Block a user