forked from rDrama/rDrama
since tempbanned can't speak, make it so they can't emit a typing event
parent
8907fdef8c
commit
5160c11478
|
@ -52,7 +52,7 @@ def old_chat(v):
|
||||||
return render_template("chat.html", v=v, messages=messages)
|
return render_template("chat.html", v=v, messages=messages)
|
||||||
|
|
||||||
@socketio.on('speak')
|
@socketio.on('speak')
|
||||||
@is_not_permabanned
|
@is_not_banned
|
||||||
def speak(data, v):
|
def speak(data, v):
|
||||||
image = None
|
image = None
|
||||||
if data['file']:
|
if data['file']:
|
||||||
|
@ -61,7 +61,6 @@ def speak(data, v):
|
||||||
f.write(data['file'])
|
f.write(data['file'])
|
||||||
image = process_image(name, v)
|
image = process_image(name, v)
|
||||||
|
|
||||||
if v.is_banned: return '', 403
|
|
||||||
if TRUESCORE_CHAT_MINIMUM and v.truescore < TRUESCORE_CHAT_MINIMUM:
|
if TRUESCORE_CHAT_MINIMUM and v.truescore < TRUESCORE_CHAT_MINIMUM:
|
||||||
return '', 403
|
return '', 403
|
||||||
|
|
||||||
|
@ -184,7 +183,7 @@ def disconnect(v):
|
||||||
return '', 204
|
return '', 204
|
||||||
|
|
||||||
@socketio.on('typing')
|
@socketio.on('typing')
|
||||||
@is_not_permabanned
|
@is_not_banned
|
||||||
def typing_indicator(data, v):
|
def typing_indicator(data, v):
|
||||||
if data and v.username not in typing:
|
if data and v.username not in typing:
|
||||||
typing.append(v.username)
|
typing.append(v.username)
|
||||||
|
|
Loading…
Reference in New Issue