public boolean searchUserInList(String name, MultipleTalkServer server){
        try {
            for (int i=0; i < server.socket.size()-1; i++){
                if(name.equals(server.socket.get(i).getName())){
                    return true;
                }
            }
            return false;
        } catch (Exception err) {
             JOptionPane.showMessageDialog(null, "Erro ao varrer lista", null, JOptionPane.PLAIN_MESSAGE , null);
             return false;
        }
    }