Nest if condition in chat

master
Outrun Colors 2022-09-27 00:31:23 -05:00
parent 300a5164f6
commit 430cbe676c
No known key found for this signature in database
GPG Key ID: 0426976DCEFE6073
1 changed files with 4 additions and 3 deletions

View File

@ -85,7 +85,8 @@ 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:
if user_ids_to_socket_ids.get(recipient):
recipient_sid = user_ids_to_socket_ids[recipient] recipient_sid = user_ids_to_socket_ids[recipient]
emit('speak', data, broadcast=False, to=recipient_sid) emit('speak', data, broadcast=False, to=recipient_sid)
else: else: