char[] nameChars = hd.name.toCharArray();
char[] nameChars = hd.playerName.toCharArray();
    public void host() {        HostDialog hd;        hd = new HostDialog(frame);        hd.setVisible(true);        // verify dialog data        if (hd.name == null || hd.serverPass == null || hd.port == 0) {            return;        }        /* WORK IN PROGRESS **        // Register the game, if appropriate.        String metaserver = null;        if (hd.register) {            StringBuffer buff = new StringBuffer (hd.metaserver);            buff.append ("?action=register")                .append ("&port=")                .append (hd.port)                .append ("&owner=")                .append (hd.name)                .append ("&goalPlayers=")                .append (hd.goalPlayers)                .append ("&version=")                .append (MegaMek.VERSION)                ;            metaserver = buff.toString();            try {                URL metaURL = new URL (metaserver);                BufferedReader reader = new BufferedReader                    (new InputStreamReader (metaURL.openStream()));                String line = reader.readLine();                while (null != line) {                    System.out.println (line);                    line = reader.readLine();                }            }            catch (Exception except) {                except.printStackTrace();            }        }        /* WORK IN PROGRESS **/        // Players should have to enter a non-blank, non-whitespace name.        boolean foundValid = false;        char[] nameChars = hd.name.toCharArray();        for (int loop = 0; !foundValid && loop < nameChars.length; loop++) {            if (!Character.isWhitespace(nameChars[loop])) {                foundValid = true;            }        }        if (!foundValid) {            new AlertDialog(frame, Messages.getString("MegaMek.PlayerNameAlert.title"), Messages.getString("MegaMek.PlayerNameAlert.message")).setVisible(true); //$NON-NLS-1$ //$NON-NLS-2$            return;        }        // kick off a RNG check        d6();        // start server        server = new Server(hd.serverPass, hd.port);        // initialize client        client = new Client(hd.name, "localhost", hd.port); //$NON-NLS-1$        ClientGUI gui = new ClientGUI(client);        gui.initialize();        if (!client.connect()) {        }        launch(gui.getFrame());        Vector changedOptions = server.getGame().getOptions().loadOptions(hd.serverPass);        if (changedOptions.size() > 0) {            client.sendGameOptions(hd.serverPass, changedOptions);        }        optdlg = null;    }