This commit is contained in:
sidya82 2015-04-02 17:53:07 +02:00
parent 0f95ae8e4c
commit dee6d9e6cd
1 changed files with 3 additions and 3 deletions

View File

@ -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())