public void disconnect() {
        try {
            Connection.this.send("QUIT :"+GUI.quitMessage);
            this.isConnected = false;
            Thread.currentThread().interrupt();
        } catch (IOException ex) {
            System.out.println("disconnect() io exception");
        } catch (BadLocationException e) {
            e.printStackTrace();
        }
    }