From 395d436008824523f8c514ff09be0054dd5c6781 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Tue, 10 Jul 2012 17:15:52 -0500 Subject: [PATCH] Seen: punctuation nitpicking, and provide response when user was not seen --- modules/Seen.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/Seen.py b/modules/Seen.py index 5ad0b54..d958ae5 100644 --- a/modules/Seen.py +++ b/modules/Seen.py @@ -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()