示例#1
0
def report(message):
    try:
        match = manager.get_match(message['match'])
        match.stop_timer()
        app.logger.info(message['match'] + " " +
                        match.get_color(message['player']) +
                        " REPORTED ILLEGAL")
        evt = Request(RequestType.ILLEGAL,
                      match.get_name_from_code(message['player']))
        app.logger.info(evt.get())
        match.push_event(evt)
        emit('new_event', evt.get_json(), room=accountant.get_cpanel())
        emit('stop_timer', {}, room=message['match'])
        app.logger.info("SENT STOP TIMER EVENT")
    except:
        app.logger.info("ERROR EN REPORT ILLEGAL")
        traceback.print_exc()