From fc71c53b0ebf45cabf9e93f375687eadaf5463f4 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 26 Feb 2004 15:53:45 +0000 Subject: [PATCH] Made echo use standardSubstitute. --- ChangeLog | 8 +++++--- plugins/Utilities.py | 4 +++- test/test_Utilities.py | 3 +++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a670010bd..bfe635d1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/plugins/Utilities.py b/plugins/Utilities.py index 865e60cb0..f23f00115 100644 --- a/plugins/Utilities.py +++ b/plugins/Utilities.py @@ -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): """ diff --git a/test/test_Utilities.py b/test/test_Utilities.py index 39a3670d0..1f5264773 100644 --- a/test/test_Utilities.py +++ b/test/test_Utilities.py @@ -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')