diff --git a/roulette.py b/roulette.py index 1360000..78b256f 100644 --- a/roulette.py +++ b/roulette.py @@ -108,7 +108,7 @@ def get_player_from_full_name(firstname, name): machines.id,machines.ip,players.ban_end from players inner join machines on players.id=machines.player_id - where players.firstname=%s and players.name=%s"""% [firstname, name]) + where players.firstname=%s and players.name=%s"""% firstname, name) row = cur.fetchone() con.close() @@ -206,11 +206,11 @@ def ban(player_id, target_id, success): ban_end = time() + BAN_DURATION cur.execute("""update players set ban_end=%f - where id=%i"""% [ban_end, banned_player['id']]) + where id=%i"""% (ban_end, banned_player['id'])) cur.execute("""insert into bans (player_id,target_id,success,time) - values %i,%i,%i,%f"""% [player['id'], target['id'], \ - success and 1 or 0, time()]) + values %i,%i,%i,%f"""% (player['id'], target['id'], \ + success and 1 or 0, time()) con.commit() con.close() @@ -220,7 +220,7 @@ def unban(player_id): cur = con.cursor() cur.execute("""update players set ban_end=%f - where id=%i"""% [time() - BAN_DURATION, player_id]) + where id=%i"""% (time() - BAN_DURATION, player_id)) con.commit() con.close()