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): if not ircdb.users.hasUser(name):
try: try:
hostmask = irc.state.nickToHostmask(name) hostmask = irc.state.nickToHostmask(name)
name = ircdb.users.getUserId(hostmask) name = ircdb.users.getUser(hostmask).name
except KeyError: except KeyError:
irc.error(msg, conf.replyNoUser) irc.error(msg, conf.replyNoUser)
return return
@ -367,8 +367,6 @@ class ChannelDB(callbacks.Privmsg,
else: else:
(seen, m) = cursor.fetchone() (seen, m) = cursor.fetchone()
seen = int(seen) seen = int(seen)
if isinstance(name, int):
name = ircdb.users.getUser(int(name)).name
s = '%s was last seen here %s ago saying %r' % \ s = '%s was last seen here %s ago saying %r' % \
(name, utils.timeElapsed(time.time() - seen), m) (name, utils.timeElapsed(time.time() - seen), m)
irc.reply(msg, s) irc.reply(msg, s)