Poulet
This commit is contained in:
		@@ -52,7 +52,7 @@ def handleRequest(connection, data):
 | 
				
			|||||||
        connection.send("ERR_COMMAND_NOT_FOUND".encode())
 | 
					        connection.send("ERR_COMMAND_NOT_FOUND".encode())
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        if  arrayData[0] == "/newname" :
 | 
					        if  arrayData[0] == "/newname" :
 | 
				
			||||||
            newName(connection)
 | 
					            newName(connection, arrayData[1])
 | 
				
			||||||
            return
 | 
					            return
 | 
				
			||||||
        if arrayData[0] == "/quit" :
 | 
					        if arrayData[0] == "/quit" :
 | 
				
			||||||
            quit(connection)
 | 
					            quit(connection)
 | 
				
			||||||
@@ -91,7 +91,7 @@ def changeName(connection, pseudo):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
def newName(connection, pseudo):
 | 
					def newName(connection, pseudo):
 | 
				
			||||||
    broadcastMsg("HAS_JOIN {} ".format(pseudo))
 | 
					    broadcastMsg("HAS_JOIN {} ".format(pseudo))
 | 
				
			||||||
    connection.send("SUCC_VALID_NICKNAME")
 | 
					    connection.send("SUCC_VALID_NICKNAME".encode())
 | 
				
			||||||
    usersConnected[connection][1] = pseudo
 | 
					    usersConnected[connection][1] = pseudo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,4 +3,3 @@ from serveur import Server
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
    Server.main()
 | 
					    Server.main()
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user