Seen: fix tests so they pass. fix seen command so it properly accepts nick wildcards.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
Daniel Folkinshteyn 2011-04-04 16:30:52 -04:00 committed by James McCoy
parent 8ded033410
commit ce9891368b
2 changed files with 3 additions and 3 deletions

View File

@ -216,10 +216,10 @@ class Seen(callbacks.Plugin):
Returns the last time <nick> was seen and what <nick> was last seen
saying. <channel> is only necessary if the message isn't sent on the
channel itself.
channel itself. <nick> may contain * as a wildcard.
"""
self._seen(irc, channel, name)
seen = wrap(seen, ['channel', 'nick'])
seen = wrap(seen, ['channel', 'something'])
def any(self, irc, msg, args, channel, optlist, name):
"""[<channel>] [--user <name>] [<nick>]

View File

@ -50,7 +50,7 @@ class ChannelDBTestCase(ChannelPluginTestCase):
self.assertNotRegexp('seen asldfkjasdlfkj', 'KeyError')
def testAny(self):
self.assertRegexp('seen any', 'test has joined')
self.assertRegexp('seen any', 'test <test!user@host.domain.tld> has joined')
self.irc.feedMsg(ircmsgs.mode(self.channel, args=('+o', self.nick),
prefix=self.prefix))
self.assertRegexp('seen any %s' % self.nick,