mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 20:22:45 +01:00
Didn't have a .users before the getUser.
This commit is contained in:
parent
2c78876a5e
commit
973cc66793
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user