<commit_before>// -*- Mode: JavaScript; tab-width: 4 -*- vim:tabstop=4 syntax=javascript:
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

module.version = "0.2.2 (9 Dec 2011)";
//module.prefs = { internal: true }

module.cmd_js =
function cmd_js(dest, msg, nick, host, at, serv, relay)
{	var ret, pin = system.safeMode();
	try
	{	let aucgbot = undefined;
		let system = undefined;
		let pin = undefined;
		ret = eval(msg);
	} catch (ex) { aucgbot.msg(dest, at + "uncaught exception:", ex) }
	system.safeMode(pin);
	if (ret)
	{	if (typeof ret == "function")
			aucgbot.msg(dest, at + "(function)");
		else
			aucgbot.msg(dest, at + typeof ret, JSON.stringify(ret));
	}
	return true;
}<commit_msg>I think I got the js module working now<commit_after>// -*- Mode: JavaScript; tab-width: 4 -*- vim:tabstop=4 syntax=javascript:
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

module.version = "0.2.3 (8 Mar 2012)";
//module.prefs = { internal: true }
if (!aucgbot.pin)
{	aucgbot.pin = system.safeMode();
	system.safeMode(aucgbot.pin);
}

module.cmd_js =
function cmd_js(dest, msg, nick, host, at, serv, relay)
{	var ret; system.safeMode()
	try
	{	let aucgbot = undefined;
		let system = undefined;
		let pin = undefined;
		ret = eval(msg);
	} catch (ex) { aucgbot.msg(dest, at + "uncaught exception:", ex) }
	system.safeMode(aucgbot.pin);
	if (ret)
	{	if (typeof ret == "function")
			aucgbot.msg(dest, at + "(function)");
		else
			aucgbot.msg(dest, at + typeof ret, JSON.stringify(ret));
	}
	return true;
}
{'fraction_non_alphanumeric': 0.15503023639362287, 'fraction_numerical': 0.015393073117097306, 'mean_word_length': 3.642857142857143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2685676', 'n_tokens_mistral': 685, 'n_tokens_neox': 651, 'n_words': 210}