bugfix: don't allow query for debug

This commit is contained in:
Brian S. Stephan 2010-07-25 12:59:54 -05:00
parent a49ca0491d
commit 97368e8ba5
1 changed files with 6 additions and 5 deletions

View File

@ -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