Seen: punctuation nitpicking, and provide response when user was not seen
This commit is contained in:
parent
d94d7f0c88
commit
395d436008
@ -110,8 +110,10 @@ class Seen(Module):
|
||||
db.close()
|
||||
if result:
|
||||
seentime = datetime.strptime(result['time'], '%Y-%m-%d %H:%M:%S').replace(tzinfo=tzutc())
|
||||
replystr = 'last saw {0:s} in {3:s} at {1:s} saying \'{2:s}\''.format(result['nick'], seentime.astimezone(tzlocal()).strftime('%Y/%m/%d %H:%M:%S %Z'), result['what'].encode('utf-8', 'ignore'), result['location'].encode('utf-8', 'ignore'))
|
||||
replystr = 'last saw {0:s} in {3:s} at {1:s} saying \'{2:s}\'.'.format(result['nick'], seentime.astimezone(tzlocal()).strftime('%Y/%m/%d %H:%M:%S %Z'), result['what'].encode('utf-8', 'ignore'), result['location'].encode('utf-8', 'ignore'))
|
||||
return self.reply(connection, event, replystr)
|
||||
else:
|
||||
return self.reply(connection, event, 'i have not seen {0:s} in {1:s}.'.format(nick, where))
|
||||
except sqlite3.Error as e:
|
||||
db.rollback()
|
||||
db.close()
|
||||
|
Loading…
Reference in New Issue
Block a user