Added RFE #827538 and fixed the help test.

This commit is contained in:
Jeremy Fincher 2003-10-24 21:55:34 +00:00
parent 42795d34d0
commit a666eddd16
2 changed files with 6 additions and 3 deletions

View File

@ -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)

View File

@ -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')