Ajout de ban_guimoz et ban_aleatoire
This commit is contained in:
parent
4abe9bd675
commit
4ddb788e82
1 changed files with 16 additions and 1 deletions
17
roulette.py
17
roulette.py
|
@ -11,6 +11,7 @@ from time import time, localtime, strftime
|
||||||
import locale
|
import locale
|
||||||
import random
|
import random
|
||||||
import json
|
import json
|
||||||
|
import sys
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
@ -441,6 +442,20 @@ def complete():
|
||||||
con.close()
|
con.close()
|
||||||
return json.dumps(rows)
|
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__':
|
if __name__ == '__main__':
|
||||||
app.run()
|
if(sys.argv[1] == "ban_guimoz"):
|
||||||
|
ban_guimoz()
|
||||||
|
elif(sys.argv[1] == "ban_alea"):
|
||||||
|
ban_aleatoire()
|
||||||
|
else:
|
||||||
|
app.run()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue