Updated to tell what channel the seen commands are being applied to.

This commit is contained in:
Daniel DiPaolo 2004-11-08 16:57:12 +00:00
parent 3f1dfa09c0
commit eed842270d
1 changed files with 8 additions and 6 deletions

View File

@ -149,8 +149,9 @@ class Seen(callbacks.Privmsg):
if len(results) == 1: if len(results) == 1:
(nick, info) = results[0] (nick, info) = results[0]
(when, said) = info (when, said) = info
irc.reply('%s was last seen here %s ago saying: %s' % irc.reply('%s was last seen in %s %s ago saying: %s' %
(nick, utils.timeElapsed(time.time()-when), said)) (nick, channel, utils.timeElapsed(time.time()-when),
said))
elif len(results) > 1: elif len(results) > 1:
L = [] L = []
for (nick, info) in results: for (nick, info) in results:
@ -174,8 +175,8 @@ class Seen(callbacks.Privmsg):
""" """
try: try:
(when, said) = self.db.seen(channel, '<last>') (when, said) = self.db.seen(channel, '<last>')
irc.reply('Someone was last seen here %s ago saying: %s' % irc.reply('Someone was last seen in %s %s ago saying: %s' %
(utils.timeElapsed(time.time()-when), said)) (channel, utils.timeElapsed(time.time()-when), said))
except KeyError: except KeyError:
irc.reply('I have never seen anyone.') irc.reply('I have never seen anyone.')
last = wrap(last, ['channel']) last = wrap(last, ['channel'])
@ -192,8 +193,9 @@ class Seen(callbacks.Privmsg):
""" """
try: try:
(when, said) = self.db.seen(channel, user.id) (when, said) = self.db.seen(channel, user.id)
irc.reply('%s was last seen here %s ago saying: %s' % irc.reply('%s was last seen in %s %s ago saying: %s' %
(user.name, utils.timeElapsed(time.time()-when), said)) (user.name, channel, utils.timeElapsed(time.time()-when),
said))
except KeyError: except KeyError:
irc.reply('I have not seen %s.' % name) irc.reply('I have not seen %s.' % name)
user = wrap(user, ['channel', 'otherUser']) user = wrap(user, ['channel', 'otherUser'])