Made echo use standardSubstitute.

This commit is contained in:
Jeremy Fincher 2004-02-26 15:53:45 +00:00
parent 5606fe62c3
commit fc71c53b0e
3 changed files with 11 additions and 4 deletions

View File

@ -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.

View File

@ -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>

View File

@ -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')