<commit_before>/*jshint
	browser:	true,
	devel:		true
*/
/*global
	ajaxJson
*/

function MessageBotCore() {
	//Avoid trying to launch the bot on a non-console page.
	if (!document.getElementById('messageText')) {
		alert('Please start a server and navigate to the console page before starting the bot.');
	}
	
	//For colored chat
	document.styleSheets[0].insertRule('.admin > span:first-child { color: #0007CF}', 0);
	document.styleSheets[0].insertRule('.mod > span:first-child { color: #08C738}', 0);
	//We are replacing these with our own functions.
	document.getElementById('messageButton').setAttribute('onclick', 'return bot.core.userSend(bot.core);');
	document.getElementById('messageText').setAttribute('onkeydown',  'bot.core.enterCheck(event, bot.core)');
	
	//fix setTimeout on IE 9
	(function() {
		if (document.all && !window.setTimeout.isPolyfill) {
			var __nativeST__ = window.setTimeout;
			window.setTimeout = function (vCallback, nDelay /*, argumentToPass1, argumentToPass2, etc. */) {
				var aArgs = Array.prototype.slice.call(arguments, 2);
				return __nativeST__(vCallback instanceof Function ? function () {
					vCallback.apply(null, aArgs);
				} : vCallback, nDelay);
			};
			window.setTimeout.isPolyfill = true;
		}
	}());
	
	//Defaults
	var core = {
				version: '5.1.0', 
				online: ['SERVER'], 
				players: {},
				logs: [],
				listening: false,
				_shouldListen: false,
				checkOnlineWait: 60000 * 5,
				joinFuncs: {},
				leaveFuncs: {},
				triggerFuncs: {},<commit_msg>Change colored chat method<commit_after>/*jshint
	browser:	true,
	devel:		true
*/
/*global
	ajaxJson
*/

function MessageBotCore() {
	//Avoid trying to launch the bot on a non-console page.
	if (!document.getElementById('messageText')) {
		alert('Please start a server and navigate to the console page before starting the bot.');
	}
	
	//For colored chat
	document.head.innerHTML += '<style>.admin > span:first-child { color: #0007CF} .mod > span:first-child { color: #08C738}</style>';
	//We are replacing these with our own functions.
	document.getElementById('messageButton').setAttribute('onclick', 'return bot.core.userSend(bot.core);');
	document.getElementById('messageText').setAttribute('onkeydown',  'bot.core.enterCheck(event, bot.core)');
	
	//fix setTimeout on IE 9
	(function() {
		if (document.all && !window.setTimeout.isPolyfill) {
			var __nativeST__ = window.setTimeout;
			window.setTimeout = function (vCallback, nDelay /*, argumentToPass1, argumentToPass2, etc. */) {
				var aArgs = Array.prototype.slice.call(arguments, 2);
				return __nativeST__(vCallback instanceof Function ? function () {
					vCallback.apply(null, aArgs);
				} : vCallback, nDelay);
			};
			window.setTimeout.isPolyfill = true;
		}
	}());
	
	//Defaults
	var core = {
				version: '5.1.0', 
				online: ['SERVER'], 
				players: {},
				logs: [],
				listening: false,
				_shouldListen: false,
				checkOnlineWait: 60000 * 5,
				joinFuncs: {},
				leaveFuncs: {},
				triggerFuncs: {},
{'fraction_non_alphanumeric': 0.1494828161494828, 'fraction_numerical': 0.016016016016016016, 'mean_word_length': 3.8986928104575163, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6113414', 'n_tokens_mistral': 1092, 'n_tokens_neox': 949, 'n_words': 232}