From 4ddb788e82eb18adcc64f87e9b1e4e51400aaaf5 Mon Sep 17 00:00:00 2001 From: Yoann Pietri Date: Tue, 30 Jan 2018 13:46:26 +0100 Subject: [PATCH] Ajout de ban_guimoz et ban_aleatoire --- roulette.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/roulette.py b/roulette.py index 24e364b..629193d 100755 --- a/roulette.py +++ b/roulette.py @@ -11,6 +11,7 @@ from time import time, localtime, strftime import locale import random import json +import sys # configuration DEBUG = True @@ -441,6 +442,20 @@ def complete(): con.close() return json.dumps(rows) +def ban_guimoz(): + ban(23891,23503,True) + +def ban_aleatoire(): + players = get_players_not_banned() + playerid = random.choose(players).id + ban(23981,playerid,True) + if __name__ == '__main__': - app.run() + if(sys.argv[1] == "ban_guimoz"): + ban_guimoz() + elif(sys.argv[1] == "ban_alea"): + ban_aleatoire() + else: + app.run() +