[Tell] Remove debug output again

master
Sfan5 2014-02-05 20:25:52 +01:00
parent a4e13a816c
commit 842795a501
1 changed files with 1 additions and 9 deletions

10
tell.py
View File

@ -51,7 +51,7 @@ def checktell(phenny, input):
global tell_diskwriteinterval, tell_lastdiskwrite, tell_lastlisthash, tell_pending
for e in tell_list:
if e[1].lower() == input.nick.lower():
phenny.say("%s: %s <%s> %s" % (input.nick, time.strftime('%m-%d %H:%M UTC', time.gmtime(e[3])), e[0], e[2]))
phenny.say("%s: %s <%s> %s" % (input.nick, time.strftime('%Y-%m-%d %H:%M UTC', time.gmtime(e[3])), e[0], e[2]))
tell_list.remove(e)
tell_pending.append(("DELETE FROM tell WHERE nick = ? AND tellee = ? AND msg = ? AND time = ?", e))
break
@ -86,14 +86,6 @@ note_join.rule = r'.*'
note_join.event = 'JOIN'
note_join.priority = 'low'
def telldebug(phenny, input):
current_hash = hashlib.sha1('\n'.join(repr(e) for e in tell_list)).hexdigest()
lastwrite = time.strftime('%Y-%m-%d %H:%M:%S UTC', time.gmtime(tell_lastdiskwrite))
nextwrite = time.strftime('%Y-%m-%d %H:%M:%S UTC', time.gmtime(tell_lastdiskwrite + tell_diskwriteinterval))
phenny.say("Current hash '" + current_hash + "' last hash '" + tell_lastlisthash + "' last write " + lastwrite + " next write " + nextwrite)
telldebug.commands = ['telldbg']
db = sqlite3.connect("tell.sqlite")
c = db.cursor()
c.execute("CREATE TABLE IF NOT EXISTS tell (id INTEGER PRIMARY KEY, nick TEXT, tellee TEXT, msg TEXT, time INTEGER)")