From 7b86dfb195dd9a790b49b005db9e99bbf8e3716b Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 13 Nov 2003 18:38:52 +0000 Subject: [PATCH] Made $nick the same as $who. --- src/plugins.py | 2 +- test/test_plugins.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins.py b/src/plugins.py index 29050e672..ba7f8d37c 100644 --- a/src/plugins.py +++ b/src/plugins.py @@ -337,7 +337,7 @@ _randomnickRe = re.compile(r'\$randomnick', re.I) _randomdateRe = re.compile(r'\$randomdate', re.I) _randomintRe = re.compile(r'\$randomint', re.I) _channelRe = re.compile(r'\$channel', re.I) -_whoRe = re.compile(r'\$who', re.I) +_whoRe = re.compile(r'\$(?:who|nick)', re.I) _botnickRe = re.compile(r'\$botnick', re.I) _todayRe = re.compile(r'\$today', re.I) _nowRe = re.compile(r'\$now', re.I) diff --git a/test/test_plugins.py b/test/test_plugins.py index 80c6302dc..beacc9491 100644 --- a/test/test_plugins.py +++ b/test/test_plugins.py @@ -74,6 +74,8 @@ class FunctionsTestCase(unittest.TestCase): self.irc.nick) self.assertEqual(plugins.standardSubstitute(self.irc, msg, '$who'), msg.nick) + self.assertEqual(plugins.standardSubstitute(self.irc, msg, '$nick'), + msg.nick) self.assert_(plugins.standardSubstitute(self.irc, msg, '$randomdate')) q = plugins.standardSubstitute(self.irc,msg,'$randomdate\t$randomdate') dl = q.split('\t')