bugfix: don't allow query for debug
This commit is contained in:
parent
a49ca0491d
commit
97368e8ba5
11
dr.botzo.py
11
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
|
||||
|
Loading…
Reference in New Issue
Block a user