From 97368e8ba5916fed72776e16e5bdb7d6bd4db9d6 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sun, 25 Jul 2010 12:59:54 -0500 Subject: [PATCH] bugfix: don't allow query for debug --- dr.botzo.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dr.botzo.py b/dr.botzo.py index 424ecab..bf2924f 100755 --- a/dr.botzo.py +++ b/dr.botzo.py @@ -99,11 +99,12 @@ def sub_report_seen(connection, event, nick, userhost, replypath, what, admin_un whats = what.split(' ') if whats[0] == 'seen' and len(whats) >= 2: query = whats[1] - try: - seendata = config.get('seen', query).split('|:|') - converted = datetime.strptime(seendata[1], "%Y-%m-%dT%H:%M:%S.%f").replace(tzinfo=tzutc()) - connection.privmsg(replypath, 'last saw ' + query + ' at ' + converted.astimezone(tzlocal()).strftime("%Y/%m/%d %H:%M:%S %Z") + ' saying \'' + seendata[2] + '\'') - except NoOptionError: pass + if query != 'debug': + try: + seendata = config.get('seen', query).split('|:|') + converted = datetime.strptime(seendata[1], "%Y-%m-%dT%H:%M:%S.%f").replace(tzinfo=tzutc()) + connection.privmsg(replypath, 'last saw ' + query + ' at ' + converted.astimezone(tzlocal()).strftime("%Y/%m/%d %H:%M:%S %Z") + ' saying \'' + seendata[2] + '\'') + except NoOptionError: pass ##### # sub_save_config