mirror of https://github.com/Mikaela/Limnoria.git
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
|
* Updated Network.whois so that it can now retrieve
|
||||||
information on all domains.
|
information on all domains.
|
||||||
|
|
||||||
|
@ -8,9 +10,9 @@
|
||||||
Weather.weather is called and in which unit (C, F, K) to report
|
Weather.weather is called and in which unit (C, F, K) to report
|
||||||
the weather.
|
the weather.
|
||||||
|
|
||||||
* Made standard replies (such as supybot.replies.success, etc.)
|
* Updated standard replies (such as supybot.replies.success, etc.)
|
||||||
use the standard substitute (such as $nick, $who, $channel, etc.)
|
to use the standard substitute (such as $nick, $who, $channel,
|
||||||
in their text.
|
etc.) in their text.
|
||||||
|
|
||||||
* Fixed snarfers to respect lobotomies.
|
* Fixed snarfers to respect lobotomies.
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,9 @@ class Utilities(callbacks.Privmsg):
|
||||||
"""
|
"""
|
||||||
if not args:
|
if not args:
|
||||||
raise callbacks.ArgumentError
|
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):
|
def re(self, irc, msg, args):
|
||||||
"""<regexp> <text>
|
"""<regexp> <text>
|
||||||
|
|
|
@ -66,6 +66,9 @@ class UtilitiesTestCase(PluginTestCase, PluginDocumentation):
|
||||||
m = self.getMsg('status cpu')
|
m = self.getMsg('status cpu')
|
||||||
self.assertResponse('echo "%s"' % m.args[1], m.args[1])
|
self.assertResponse('echo "%s"' % m.args[1], m.args[1])
|
||||||
|
|
||||||
|
def testEchoStandardSubstitute(self):
|
||||||
|
self.assertNotRegexp('echo $nick', r'\$')
|
||||||
|
|
||||||
def testRe(self):
|
def testRe(self):
|
||||||
self.assertResponse('re "m/system time/" [status cpu]', 'system time')
|
self.assertResponse('re "m/system time/" [status cpu]', 'system time')
|
||||||
self.assertResponse('re s/user/luser/g user user', 'luser luser')
|
self.assertResponse('re s/user/luser/g user user', 'luser luser')
|
||||||
|
|
Loading…
Reference in New Issue