@Override
    public void onDisconnect() {
        lastPing = -1;
        try {
            LOGGER_D.debug("Internal reconnection: " + this.getServer());
            String[] channels = this.getChannels();
            this.reconnect();
            for (int i = 0; i < channels.length; i++) {
                this.joinChannel(channels[i]);
            }
        } catch (NickAlreadyInUseException e) {
            logMain("[ERROR] Nickname already in use - " + this.getNick() + " " + this.getServer());
        } catch (IOException e) {
            logMain("[ERROR] Unable to connect to server - " + this.getNick() + " " + this.getServer());
        } catch (IrcException e) {
            logMain("[ERROR] Error connecting to server - " + this.getNick() + " " + this.getServer());
        }

    }