mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Made --from use ircutils.nickEqual.
This commit is contained in:
parent
9240ca88b6
commit
689c464012
@ -355,7 +355,8 @@ class Misc(callbacks.Privmsg):
|
|||||||
if option == 'fancy':
|
if option == 'fancy':
|
||||||
fancy = True
|
fancy = True
|
||||||
elif option == 'from':
|
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':
|
elif option == 'in' or option == 'to':
|
||||||
if not ircutils.isChannel(arg):
|
if not ircutils.isChannel(arg):
|
||||||
irc.error(msg, 'Argument to --%s must be a channel.' % arg)
|
irc.error(msg, 'Argument to --%s must be a channel.' % arg)
|
||||||
|
@ -118,6 +118,8 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation):
|
|||||||
self.assertResponse('last --with foo', 'foo bar baz')
|
self.assertResponse('last --with foo', 'foo bar baz')
|
||||||
self.assertRegexp('last --regexp m/\s+/', 'last --with foo')
|
self.assertRegexp('last --regexp m/\s+/', 'last --with foo')
|
||||||
self.assertResponse('last --regexp m/bar/', 'foo bar baz')
|
self.assertResponse('last --regexp m/bar/', 'foo bar baz')
|
||||||
|
self.assertResponse('last --from %s' % self.nick.upper(),
|
||||||
|
'@last --regexp m/bar/')
|
||||||
|
|
||||||
def testMore(self):
|
def testMore(self):
|
||||||
self.assertRegexp('echo %s' % ('abc'*300), 'more')
|
self.assertRegexp('echo %s' % ('abc'*300), 'more')
|
||||||
|
Loading…
Reference in New Issue
Block a user