Merge branch 'master' of gitlab.rezometz.org:guimoz/roulette-legacy

This commit is contained in:
guimoz 2017-01-31 18:32:40 +01:00
commit fa6fb1835d

View file

@ -207,10 +207,10 @@ def ban(player_id, target_id, success):
cur.execute("""update players set ban_end=%f cur.execute("""update players set ban_end=%f
where id=%i"""% (ban_end, banned_player['id'])) where id=%i"""% (ban_end, banned_player['id']))
requete = """insert into bans (player_id,target_id,success,time) values (%i,%i,%i,%f)"""% (player['id'], target['id'],success and 1 or 0, time())
cur.execute("""insert into bans (player_id,target_id,success,time) cur.execute(requete)
values (%i,%i,%i,%f)"""% (player['id'], target['id'], \ if DEBUG:
success and 1 or 0, time())) print(requete)
con.commit() con.commit()
con.close() con.close()