Made --from use ircutils.nickEqual.

This commit is contained in:
Jeremy Fincher 2003-10-22 08:08:59 +00:00
parent 9240ca88b6
commit 689c464012
2 changed files with 4 additions and 1 deletions

View File

@ -355,7 +355,8 @@ class Misc(callbacks.Privmsg):
if option == 'fancy':
fancy = True
elif option == 'from':
predicates.append(lambda m, arg=arg: m.nick == arg)
predicates.append(lambda m, arg=arg: ircutils.nickEqual(m.nick,
arg))
elif option == 'in' or option == 'to':
if not ircutils.isChannel(arg):
irc.error(msg, 'Argument to --%s must be a channel.' % arg)

View File

@ -118,6 +118,8 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation):
self.assertResponse('last --with foo', 'foo bar baz')
self.assertRegexp('last --regexp m/\s+/', 'last --with foo')
self.assertResponse('last --regexp m/bar/', 'foo bar baz')
self.assertResponse('last --from %s' % self.nick.upper(),
'@last --regexp m/bar/')
def testMore(self):
self.assertRegexp('echo %s' % ('abc'*300), 'more')