Suppression de workaround pour sqlite
This commit is contained in:
parent
583475d1b6
commit
af2e766e0a
1 changed files with 0 additions and 10 deletions
10
roulette.py
10
roulette.py
|
@ -202,22 +202,12 @@ def ban(player_id, target_id, success):
|
||||||
cur.execute("""select id,ban_end from players
|
cur.execute("""select id,ban_end from players
|
||||||
where id=%i"""% banned_player['id'])
|
where id=%i"""% banned_player['id'])
|
||||||
|
|
||||||
con.commit()
|
|
||||||
con.close()
|
|
||||||
con = connect_sql()
|
|
||||||
cur = con.cursor()
|
|
||||||
|
|
||||||
ban_end = cur.fetchone()[0]
|
ban_end = cur.fetchone()[0]
|
||||||
ban_end = time() + BAN_DURATION
|
ban_end = time() + BAN_DURATION
|
||||||
|
|
||||||
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']])
|
||||||
|
|
||||||
|
|
||||||
con.commit()
|
|
||||||
con.close()
|
|
||||||
con = connect_sql()
|
|
||||||
cur = con.cursor()
|
|
||||||
cur.execute("""insert into bans (player_id,target_id,success,time)
|
cur.execute("""insert into bans (player_id,target_id,success,time)
|
||||||
values %i,%i,%i,%f"""% [player['id'], target['id'], \
|
values %i,%i,%i,%f"""% [player['id'], target['id'], \
|
||||||
success and 1 or 0, time()])
|
success and 1 or 0, time()])
|
||||||
|
|
Loading…
Reference in a new issue