Seen: don't overwrite the speaking nick
in case we ever need it for anything
This commit is contained in:
parent
bda4b78564
commit
3316f4a868
@ -72,16 +72,16 @@ class Seen(Module):
|
||||
def seen(self, nick, userhost, event, from_admin, groups):
|
||||
"""Report on when a nick was last seen in a channel."""
|
||||
|
||||
nick, = groups
|
||||
query_nick, = groups
|
||||
source = event.target()
|
||||
try:
|
||||
seen_nick = SeenNick.objects.get(nick=nick, channel=source)
|
||||
seen_nick = SeenNick.objects.get(nick=query_nick, channel=source)
|
||||
local_time = timezone.localtime(seen_nick.seen_time).strftime('%Y-%m-%d %H:%M:%S %Z')
|
||||
return self.irc.reply(event,
|
||||
"last saw {0:s} in {1:s} at {2:s} saying '{3:s}'."
|
||||
"".format(seen_nick.nick, seen_nick.channel,
|
||||
local_time, seen_nick.what))
|
||||
except SeenNick.DoesNotExist:
|
||||
return self.irc.reply(event, "i have not seen {0:s} in {1:s}.".format(nick, source))
|
||||
return self.irc.reply(event, "i have not seen {0:s} in {1:s}.".format(query_nick, source))
|
||||
|
||||
# vi:tabstop=4:expandtab:autoindent
|
||||
|
Loading…
Reference in New Issue
Block a user