mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Made echo use standardSubstitute.
This commit is contained in:
parent
5606fe62c3
commit
fc71c53b0e
@ -1,3 +1,5 @@
|
||||
* Updated echo to use the standard substitute on its reply.
|
||||
|
||||
* Updated Network.whois so that it can now retrieve
|
||||
information on all domains.
|
||||
|
||||
@ -8,9 +10,9 @@
|
||||
Weather.weather is called and in which unit (C, F, K) to report
|
||||
the weather.
|
||||
|
||||
* Made standard replies (such as supybot.replies.success, etc.)
|
||||
use the standard substitute (such as $nick, $who, $channel, etc.)
|
||||
in their text.
|
||||
* Updated standard replies (such as supybot.replies.success, etc.)
|
||||
to use the standard substitute (such as $nick, $who, $channel,
|
||||
etc.) in their text.
|
||||
|
||||
* Fixed snarfers to respect lobotomies.
|
||||
|
||||
|
@ -122,7 +122,9 @@ class Utilities(callbacks.Privmsg):
|
||||
"""
|
||||
if not args:
|
||||
raise callbacks.ArgumentError
|
||||
irc.reply(' '.join(args), prefixName=False)
|
||||
text = privmsgs.getArgs(args)
|
||||
text = plugins.standardSubstitute(irc, msg, text)
|
||||
irc.reply(text, prefixName=False)
|
||||
|
||||
def re(self, irc, msg, args):
|
||||
"""<regexp> <text>
|
||||
|
@ -66,6 +66,9 @@ class UtilitiesTestCase(PluginTestCase, PluginDocumentation):
|
||||
m = self.getMsg('status cpu')
|
||||
self.assertResponse('echo "%s"' % m.args[1], m.args[1])
|
||||
|
||||
def testEchoStandardSubstitute(self):
|
||||
self.assertNotRegexp('echo $nick', r'\$')
|
||||
|
||||
def testRe(self):
|
||||
self.assertResponse('re "m/system time/" [status cpu]', 'system time')
|
||||
self.assertResponse('re s/user/luser/g user user', 'luser luser')
|
||||
|
Loading…
Reference in New Issue
Block a user