Ajout de ban_guimoz et ban_aleatoire

This commit is contained in:
Yoann Pétri 2018-01-30 13:46:26 +01:00 committed by root
parent 4abe9bd675
commit 4ddb788e82

View file

@ -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()