From a666eddd16db2dd4ce2a3b8b6cc1f7e081cebe61 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 24 Oct 2003 21:55:34 +0000 Subject: [PATCH] Added RFE #827538 and fixed the help test. --- src/Misc.py | 4 ++-- test/test_Misc.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Misc.py b/src/Misc.py index 04cbaaafe..0601f9461 100755 --- a/src/Misc.py +++ b/src/Misc.py @@ -346,8 +346,8 @@ class Misc(callbacks.Privmsg): if option == 'fancy': fancy = True elif option == 'from': - predicates.append(lambda m, arg=arg: ircutils.nickEqual(m.nick, - arg)) + predicates.append(lambda m, arg=arg: \ + ircutils.hostmaskPatternEqual(arg, m.nick)) elif option == 'in' or option == 'to': if not ircutils.isChannel(arg): irc.error(msg, 'Argument to --%s must be a channel.' % arg) diff --git a/test/test_Misc.py b/test/test_Misc.py index 0f91fa2be..31a95d9f3 100644 --- a/test/test_Misc.py +++ b/test/test_Misc.py @@ -69,7 +69,8 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation): finally: conf.prefixChars = original self.assertHelp('help list') - self.assertRegexp('help help', r'^\x02\(help') + self.assertRegexp('help help', r'^\(\x02help') + self.assertRegexp('help misc help', r'^\(\x02misc help') self.assertError('help morehelp') def testList(self): @@ -120,6 +121,8 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation): self.assertResponse('last --regexp m/bar/', 'foo bar baz') self.assertResponse('last --from %s' % self.nick.upper(), '@last --regexp m/bar/') + self.assertResponse('last --from %s*' % self.nick[0], + '@last --from %s' % self.nick.upper()) def testMore(self): self.assertRegexp('echo %s' % ('abc'*300), 'more')