public void send(String line) throws IOException, BadLocationException {
        if (line.equalsIgnoreCase("QUIT")) line = "QUIT :" + GUI.quitMessage;
        if (line.equalsIgnoreCase("PART")) line = "PART :" + GUI.leaveMessage;
        if (line.equalsIgnoreCase("AWAY")) line = "AWAY :" + GUI.awayMessage;

        if (line.toUpperCase().startsWith("IGNORE ") || line.toUpperCase().startsWith("UNIGNORE ")) {
            String nickname = line.substring(line.indexOf(" ") + 1);
            ChannelPanel channel = (ChannelPanel) GUI.getTabbedPane().getSelectedComponent();
            if (channel == null) return;
            if (nickname.equals(Connection.currentNick)) return;
            if (ChannelPanel.ignoreList.contains(nickname)) {
                ChannelPanel.ignoreList.remove(nickname);
                String[] msg = {null, "*** " + nickname + " removed from ignore list."};
            } else {
                if (line.toUpperCase().startsWith("UNIGNORE ")) {
                    String[] msg = {null, "*** " + nickname + " was not on the ignore list."};
                    channel.insertString(msg, GUI.serverStyle, false);
                    return;
                }
                ChannelPanel.ignoreList.add(nickname);
                String[] msg = {null, "*** " + nickname + " added to ignore list."};
            }
            return;
        }
        this.writer.write(line + "\r\n");
        this.writer.flush();

    }