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(' ')
|
whats = what.split(' ')
|
||||||
if whats[0] == 'seen' and len(whats) >= 2:
|
if whats[0] == 'seen' and len(whats) >= 2:
|
||||||
query = whats[1]
|
query = whats[1]
|
||||||
try:
|
if query != 'debug':
|
||||||
seendata = config.get('seen', query).split('|:|')
|
try:
|
||||||
converted = datetime.strptime(seendata[1], "%Y-%m-%dT%H:%M:%S.%f").replace(tzinfo=tzutc())
|
seendata = config.get('seen', query).split('|:|')
|
||||||
connection.privmsg(replypath, 'last saw ' + query + ' at ' + converted.astimezone(tzlocal()).strftime("%Y/%m/%d %H:%M:%S %Z") + ' saying \'' + seendata[2] + '\'')
|
converted = datetime.strptime(seendata[1], "%Y-%m-%dT%H:%M:%S.%f").replace(tzinfo=tzutc())
|
||||||
except NoOptionError: pass
|
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
|
# sub_save_config
|
||||||
|
|
Loading…
Reference in New Issue