Site
- add status on profil page
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
# By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2024/09/20 00:16:57 by edbernar #+# #+# #
|
||||
# Updated: 2024/09/23 00:47:12 by edbernar ### ########.fr #
|
||||
# Updated: 2024/09/23 14:37:28 by edbernar ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
@ -26,6 +26,8 @@ def getUserInfo(socket, content):
|
||||
if (not user):
|
||||
socket.sync_send({"type":"user_info", "content": None})
|
||||
return
|
||||
socket.sync_send({"type":"user_info", "content":{'username': user['username'], 'pfp': user['pfp'], 'banner': user['banner'], 'id': user['id']}})
|
||||
online = True if user['id'] in socket.onlinePlayers else False
|
||||
print("User is online: ", online)
|
||||
socket.sync_send({"type":"user_info", "content":{'username': user['username'], 'pfp': user['pfp'], 'banner': user['banner'], 'id': user['id'], 'online': online}})
|
||||
except Exception as e:
|
||||
socket.sendError("invalid request", 9005, e)
|
Reference in New Issue
Block a user