Refactored a touch.

This commit is contained in:
Jeremy Fincher 2003-11-10 15:26:55 +00:00
parent 973cc66793
commit 8f1329b20e

View File

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