diff --git a/serveur/Server.py b/serveur/Server.py index e04397c..0a46113 100644 --- a/serveur/Server.py +++ b/serveur/Server.py @@ -52,7 +52,7 @@ def handleRequest(connection, data): connection.send("ERR_COMMAND_NOT_FOUND".encode()) else: if arrayData[0] == "/newname" : - newName(connection) + newName(connection, arrayData[1]) return if arrayData[0] == "/quit" : quit(connection) @@ -91,7 +91,7 @@ def changeName(connection, pseudo): def newName(connection, pseudo): broadcastMsg("HAS_JOIN {} ".format(pseudo)) - connection.send("SUCC_VALID_NICKNAME") + connection.send("SUCC_VALID_NICKNAME".encode()) usersConnected[connection][1] = pseudo diff --git a/startServer.py b/startServer.py index 685c3a9..d004a49 100644 --- a/startServer.py +++ b/startServer.py @@ -2,5 +2,4 @@ __author__ = 'sidya' from serveur import Server if __name__ == '__main__': - Server.main() - + Server.main() \ No newline at end of file