mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 04:32:36 +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',})])
|
'regexp': 'regexpMatcher',})])
|
||||||
|
|
||||||
|
|
||||||
@internationalizeDocstring
|
def _tell(self, irc, msg, args, target, text, notice):
|
||||||
def tell(self, irc, msg, args, target, text):
|
|
||||||
"""<nick> <text>
|
|
||||||
|
|
||||||
Tells the <nick> whatever <text> is. Use nested commands to your
|
|
||||||
benefit here.
|
|
||||||
"""
|
|
||||||
if irc.nested:
|
if irc.nested:
|
||||||
irc.error('This command cannot be nested.', Raise=True)
|
irc.error('This command cannot be nested.', Raise=True)
|
||||||
if target.lower() == 'me':
|
if target.lower() == 'me':
|
||||||
@ -536,9 +530,28 @@ class Misc(callbacks.Plugin):
|
|||||||
text = '* %s %s' % (irc.nick, text)
|
text = '* %s %s' % (irc.nick, text)
|
||||||
s = _('%s wants me to tell you: %s') % (msg.nick, text)
|
s = _('%s wants me to tell you: %s') % (msg.nick, text)
|
||||||
irc.replySuccess()
|
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'])
|
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
|
@internationalizeDocstring
|
||||||
def ping(self, irc, msg, args):
|
def ping(self, irc, msg, args):
|
||||||
"""takes no arguments
|
"""takes no arguments
|
||||||
|
Loading…
Reference in New Issue
Block a user