send error to room or to admins
This commit is contained in:
parent
1e5c645c5e
commit
323b6b773c
@ -57,8 +57,12 @@ blacklist: List[str] = []
|
|||||||
|
|
||||||
def send_to_debug(error):
|
def send_to_debug(error):
|
||||||
for g in games:
|
for g in games:
|
||||||
if g.debug or any((p.is_admin() for p in g.players)):
|
if g.debug:
|
||||||
sio.emit('chat_message', room=g.name, data={'color': f'red','text':json.dumps({'ERROR':error}), 'type':'json'})
|
sio.emit('chat_message', room=g.name, data={'color': f'red','text':json.dumps({'ERROR':error}), 'type':'json'})
|
||||||
|
elif any((p.is_admin() for p in g.players)):
|
||||||
|
for p in g.players:
|
||||||
|
if p.is_admin():
|
||||||
|
sio.emit('chat_message', room=p.sid, data={'color': f'red','text':json.dumps({'ERROR':error}), 'type':'json'})
|
||||||
|
|
||||||
save_lock = False
|
save_lock = False
|
||||||
def bang_handler(func):
|
def bang_handler(func):
|
||||||
|
Loading…
Reference in New Issue
Block a user