|
|
@ -28,6 +28,10 @@ ASSHOLES_FILE = '/var/roulette/assholes' |
|
|
STATE_FILE = '/var/roulette/state' |
|
|
STATE_FILE = '/var/roulette/state' |
|
|
|
|
|
|
|
|
STATE = 'down' |
|
|
STATE = 'down' |
|
|
|
|
|
#Actualisation de l'etat de la roulette |
|
|
|
|
|
with open(STATE_FILE, 'r') as f: |
|
|
|
|
|
STATE = f.read() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app = Flask(__name__) |
|
|
app = Flask(__name__) |
|
|
app.config.from_object(__name__) |
|
|
app.config.from_object(__name__) |
|
|
@ -170,8 +174,10 @@ def get_players_not_banned(): |
|
|
|
|
|
|
|
|
def cheat(player_id, target_id): |
|
|
def cheat(player_id, target_id): |
|
|
success = random.choice([True, False]) |
|
|
success = random.choice([True, False]) |
|
|
|
|
|
with open(IMMUNITY_FILE, 'r') as f: |
|
|
|
|
|
immunity = f.read() |
|
|
try: |
|
|
try: |
|
|
ok = [line.strip().partition(' ') for line in IMMUNITY] |
|
|
ok = [line.strip().partition(' ') for line in immunity] |
|
|
ok = [get_player_from_full_name(names[0], names[2])['id'] for names in ok] |
|
|
ok = [get_player_from_full_name(names[0], names[2])['id'] for names in ok] |
|
|
|
|
|
|
|
|
ko = [line.strip().partition(' ') for line in ASSHOLES] |
|
|
ko = [line.strip().partition(' ') for line in ASSHOLES] |
|
|
|