Didn't have a .users before the getUser.

This commit is contained in:
Jeremy Fincher 2003-11-10 15:21:08 +00:00
parent 2c78876a5e
commit 973cc66793

View File

@ -359,7 +359,7 @@ class ChannelDB(callbacks.Privmsg,
else: else:
table = 'nick_seen' table = 'nick_seen'
criterion = 'nickeq(name,%s)' criterion = 'nickeq(name,%s)'
sql = "SELECT last_seen, last_msg FROM %s WHERE %s" % (table,criterion) sql = "SELECT last_seen,last_msg FROM %s WHERE %s" % (table,criterion)
#debug.printf(sql) #debug.printf(sql)
cursor.execute(sql, name) cursor.execute(sql, name)
if cursor.rowcount == 0: if cursor.rowcount == 0:
@ -368,7 +368,7 @@ class ChannelDB(callbacks.Privmsg,
(seen, m) = cursor.fetchone() (seen, m) = cursor.fetchone()
seen = int(seen) seen = int(seen)
if isinstance(name, int): if isinstance(name, int):
name = ircdb.getUser(int(name)).name 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)