mirror of https://github.com/Mikaela/Limnoria.git
Refactored a touch.
This commit is contained in:
parent
973cc66793
commit
8f1329b20e
|
@ -352,7 +352,7 @@ class ChannelDB(callbacks.Privmsg,
|
|||
if not ircdb.users.hasUser(name):
|
||||
try:
|
||||
hostmask = irc.state.nickToHostmask(name)
|
||||
name = ircdb.users.getUserId(hostmask)
|
||||
name = ircdb.users.getUser(hostmask).name
|
||||
except KeyError:
|
||||
irc.error(msg, conf.replyNoUser)
|
||||
return
|
||||
|
@ -367,8 +367,6 @@ class ChannelDB(callbacks.Privmsg,
|
|||
else:
|
||||
(seen, m) = cursor.fetchone()
|
||||
seen = int(seen)
|
||||
if isinstance(name, int):
|
||||
name = ircdb.users.getUser(int(name)).name
|
||||
s = '%s was last seen here %s ago saying %r' % \
|
||||
(name, utils.timeElapsed(time.time() - seen), m)
|
||||
irc.reply(msg, s)
|
||||
|
|
Loading…
Reference in New Issue