if (channelName != null) { if (channelName.startsWith("#")) { tabUpdate("Init Window", "Trying to join: " + channelName); if (toServer != null) { parseSendToCommand("JOIN " + channelName); } } else { tabUpdate("Init Window", "Trying to join: #" + channelName); if (toServer != null) { parseSendToCommand("JOIN #" + channelName); } } } else { tabUpdate("Init Window", "No channel name specified."); }
joinChannel(channelName);
    private void joinChan() {        String channelName;        channelName = JOptionPane.showInputDialog(theApp, channelNameString);        if (channelName != null)        {            if (channelName.startsWith("#"))            {                tabUpdate("Init Window", "Trying to join: " + channelName);                if (toServer != null)                {                    parseSendToCommand("JOIN " + channelName);                }            }            else            {                tabUpdate("Init Window", "Trying to join: #" + channelName);                if (toServer != null)                {                    parseSendToCommand("JOIN #" + channelName);                }            }        }        else        {            tabUpdate("Init Window", "No channel name specified.");        }    }