<commit_before>package kdk.cmds.fwd;

import java.util.TimerTask;

import kdk.Bot;
import kdk.MessageInfo;
import kdk.channel.Channel;

public class LiveChecker extends TimerTask {

	@Override
	public void run() {
		for(Channel c : Bot.inst.getAllChannels()) {
			String oChanID = c.getUserID();
			String curActive = c.getActiveForwarders();
			if(curActive != null) {
				String[] portions = curActive.split(", ");
				if(!kdk.api.twitch.APIv5.isStreamerLive(Bot.inst.getClientID(), oChanID)) {
					// This channel is not live, shut down all forwarders
					c.commands.forwards.executeCommand(new MessageInfo(c.channel, Bot.inst.getNick(), "FWD DEL *", "", "", Integer.MAX_VALUE));
				} else {
					// Is everyone else live though?
					for(String sc : portions) {
						// Target User ID
						String tChanID = kdk.api.twitch.APIv5.getUserID(Bot.inst.getClientID(), sc);
						if(!kdk.api.twitch.APIv5.isStreamerLive(Bot.inst.getClientID(), tChanID)) {
							// We need to shut down active forwarders from this channel
							c.commands.forwards.executeCommand(new MessageInfo(c.channel, Bot.inst.getNick(), "FWD DEL " + sc, "", "", Integer.MAX_VALUE));
						}
					}
				}
			}
		}
	}
<commit_msg>Added some debug lines to the live checker<commit_after>package kdk.cmds.fwd;

import java.util.TimerTask;

import kdk.Bot;
import kdk.MessageInfo;
import kdk.channel.Channel;

public class LiveChecker extends TimerTask {

	@Override
	public void run() {
		kdk.Bot.inst.dbg.writeln("[DBG] EXEC LiveChecker");
		kdk.Bot.inst.dbg.writeln("[DBG] Total Channels: " + Bot.inst.getAllChannels().size());
		for(Channel c : Bot.inst.getAllChannels()) {
			kdk.Bot.inst.dbg.writeln("[DBG] Working on: " + c.channel);
			String oChanID = c.getUserID();
			String curActive = c.getActiveForwarders();
			kdk.Bot.inst.dbg.writeln("[DBG] Active Forwarders: " + curActive);
			if(curActive != null) {
				String[] portions = curActive.split(", ");
				kdk.Bot.inst.dbg.writeln("[DBG] Checking if " + oChanID + " is live.");
				if(!kdk.api.twitch.APIv5.isStreamerLive(Bot.inst.getClientID(), oChanID)) {
					// This channel is not live, shut down all forwarders
					kdk.Bot.inst.dbg.writeln("[DBG] " + oChanID + " [" + c.channel + "] is NOT live.");
					c.commands.forwards.executeCommand(Bot.spoofMessage(c.channel, "FWD DEL *"));
				} else {
					kdk.Bot.inst.dbg.writeln("[DBG] " + oChanID + " [" + c.channel + "] is live.");
					// Is everyone else live though?

					kdk.Bot.inst.dbg.writeln("[DBG] Scanning through " + portions.length + " active forwarders.");
					if(portions.length > 0) {
						for(String sc : portions) {
							String tChanID = Bot.inst.getChannel(sc).getUserID();
							kdk.Bot.inst.dbg.writeln("[DBG] Checking if " + tChanID + " [" + sc + "] is live.");
							// Target User ID
							if(!kdk.api.twitch.APIv5.isStreamerLive(Bot.inst.getClientID(), tChanID)) {
								// We need to shut down active forwarders from this channel
								kdk.Bot.inst.dbg.writeln("[DBG] " + tChanID + " [" + sc + "] is NOT live.");
								c.commands.forwards.executeCommand(Bot.spoofMessage(c.channel, "FWD DEL " + sc));
							} else {
								kdk.Bot.inst.dbg.writeln("[DBG] " + tChanID + " [" + sc + "] is live.");
							}
						}
					}
				}
			}
		}
	}

{'fraction_non_alphanumeric': 0.16050137572607764, 'fraction_numerical': 0.0018343014368694588, 'mean_word_length': 3.1261034047919294, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2956312', 'n_tokens_mistral': 1364, 'n_tokens_neox': 1139, 'n_words': 229}