<commit_before>/*
	A Sauerbraten client example.
	This program prompts the user for a server host/ip and player name, connects to it, and prints server info messages.
*/

var simpleSauerClient = require("../index.js");

/*
	Create and instance of Client.
	Pass an object opts as an argument, which can have the following keys:
		host: String - IP of the server to connect to (required).
		port: Number - port number of the server to connect to (28785 by default).
		password: String - password of the server connecting to (empty by default).
		playerName: String - player name to use ("unnamed" by default).
		stayInSpec: Boolean - go to spectator automatically if unspectated (false by default).
		extInfo: Boolean - ping the server for extinfo (false by default).
*/
var sauerClient = new simpleSauerClient.Client({
											"host": "172.16.31.10",
											"port": 30000,
											"password": "",
											"playerName": "MySauerBot",
											"stayInSpec": true,
											"extInfo": true });

/*
	Print error, warning, and log events.
	warning and log events include server, frag, join/leave, ... messages.
*/
sauerClient.on("error", console.log);
sauerClient.on("warning", console.log);<commit_msg>Fixed comments.<commit_after>/*
	A Sauerbraten client example.
	This program (should prompt the user) for a server host/ip and player name, connects to it, and prints server info messages.
*/

var simpleSauerClient = require("../index.js");

/*
	Create and instance of Client.
	Pass an object opts as an argument, which can have the following keys:
		host: String - IP of the server to connect to (required).
		port: Number - port number of the server to connect to (28785 by default).
		password: String - password of the server connecting to (empty by default).
		playerName: String - player name to use ("unnamed" by default).
		stayInSpec: Boolean - go to spectator automatically if unspectated (false by default).
		extInfo: Boolean - ping the server for extinfo (false by default).
*/
var sauerClient = new simpleSauerClient.Client({
											"host": "172.16.31.10",
											"port": 30000,
											"password": "",
											"playerName": "MySauerBot",
											"stayInSpec": true,
											"extInfo": true });

/*
	Print error, warning, and log events.
	warning and log events include server, frag, join/leave, ... messages.
*/
sauerClient.on("error", console.log);
sauerClient.on("warning", console.log);
{'fraction_non_alphanumeric': 0.10869565217391304, 'fraction_numerical': 0.015586546349466776, 'mean_word_length': 3.234375, 'pattern_counts': {'":': 12, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1829913', 'n_tokens_mistral': 840, 'n_tokens_neox': 686, 'n_words': 289}