From dee6d9e6cd8c93c8e4284ec5a0bc6867a13b80a9 Mon Sep 17 00:00:00 2001 From: sidya82 Date: Thu, 2 Apr 2015 17:53:07 +0200 Subject: [PATCH] Poulet --- serveur/Server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/serveur/Server.py b/serveur/Server.py index 14e0bc8..2eb7f25 100644 --- a/serveur/Server.py +++ b/serveur/Server.py @@ -25,7 +25,7 @@ def handleRequest(connection, data): if usersConnected[connection][1] is not None : if(not arrayData[0][0] == "/"): connection.sendall("SUCC_MESSAGE_SENDED".encode()) - broadcastMsg( "NEW_MSG {} {} ".format(usersConnected[connection][1], data)) + broadcastMsg(connection,"NEW_MSG {} {} ".format(usersConnected[connection][1], data)) return else : if arrayData[0] == "/name" : @@ -77,7 +77,7 @@ def broadcastMsg(connection,message): def userListActive(connection): l = "USERLIST " for con, value in usersConnected.items() : - if value[2] == True : + if value[2] : l += value[1] + " " connection.sendall(l[:-1].encode()) @@ -85,7 +85,7 @@ def userListActive(connection): def userListAway(connection): l = "USERAWAY " for con,value in usersConnected.items() : - if value[2] == False : + if value[2]: l += value[1] + " " connection.sendall(l[:-1].encode())