public void insertString(String[] line, Style givenStyle, boolean isCTCP) throws BadLocationException, IOException {
        if (ignoreList.contains(line[0])) return;
        if (line[1].contains("http://") || line[1].contains("https://") || line[1].contains("www.") || line[1].contains("#")) {
            line[1] = line[1].replaceAll("http://", Connection.HTTP_DELIM + "http://");
            line[1] = line[1].replaceAll("https://", Connection.HTTP_DELIM + "https://");
            line[1] = line[1].replaceAll("www.", Connection.HTTP_DELIM + "www.");
            if (line[1].startsWith("#")) line[1] = line[1].replace("#", Connection.HTTP_DELIM + "#");
            line[1] = line[1].replaceAll(" #", " " + Connection.HTTP_DELIM + "#");
            insertCTCPColoredString(line, givenStyle);
            return;
        }
        if (isCTCP) {
            insertCTCPColoredString(line, givenStyle);
            return;
        }
        if (GUI.showTimestamp) {
            String timestamp = makeTimestamp();
            this.insertString(chatPane.getStyledDocument().getLength(), "\n[" + timestamp + "] ", GUI.timestampStyle);
        } else this.insertString(chatPane.getStyledDocument().getLength(), "\n", GUI.style);
        //if (!GUI.chatNameColors && line[0] != null) this.insertString(chatPane.getStyledDocument().getLength(), "<" + line[0] + ">: ", GUI.chatStyle);
        if (line[0] != null) {
            Color c = getUserColor(line[0]);
            this.insertString(chatPane.getStyledDocument().getLength(), "<", GUI.style);
            StyleConstants.setForeground(GUI.userNameStyle, c);
            this.insertString(chatPane.getStyledDocument().getLength(), line[0], GUI.userNameStyle);
            this.insertString(chatPane.getStyledDocument().getLength(), ">: ", GUI.style);
        }
        this.insertString(chatPane.getStyledDocument().getLength(), line[1], givenStyle);
    }