public void rename(String newName) {
        if(newName == null || newName.equals(""))
            return;
        if(newName.indexOf(",") != -1
                || newName.indexOf("]") != -1
                || newName.indexOf("/") != -1
                || newName.indexOf(" ") != -1) {
            fromServer("Invalid name: \""+newName+"\", cannot contain ' ', '/', ']' or ','");
            return;
        }
        if(server.findClientByName(newName) >= 0) {
            fromServer("Name \""+newName+"\" already taken!");
            return;
        }

        //this doesn't belong here
        if(!client.getName().equals(""))
            server.broadcastMessage("SMSG;"+client.getName()+" changed name to "+newName);
        client.setName(newName);
        server.broadcastMessage("NAME["+client.getId()+"]"+client.getName());
    }