forked from rDrama/rDrama
Nest if condition in chat
parent
300a5164f6
commit
430cbe676c
|
@ -85,9 +85,10 @@ def speak(data, v):
|
||||||
v.shadowbanned = 'AutoJanny'
|
v.shadowbanned = 'AutoJanny'
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
send_repeatable_notification(CARP_ID, f"{v.username} has been shadowbanned because of a chat message.")
|
send_repeatable_notification(CARP_ID, f"{v.username} has been shadowbanned because of a chat message.")
|
||||||
elif recipient and user_ids_to_socket_ids.get(recipient):
|
elif recipient:
|
||||||
recipient_sid = user_ids_to_socket_ids[recipient]
|
if user_ids_to_socket_ids.get(recipient):
|
||||||
emit('speak', data, broadcast=False, to=recipient_sid)
|
recipient_sid = user_ids_to_socket_ids[recipient]
|
||||||
|
emit('speak', data, broadcast=False, to=recipient_sid)
|
||||||
else:
|
else:
|
||||||
emit('speak', data, broadcast=True)
|
emit('speak', data, broadcast=True)
|
||||||
messages.append(data)
|
messages.append(data)
|
||||||
|
|
Loading…
Reference in New Issue