<commit_before>package dl.socket ;

/**
 * ...
 * @author Namide
 */
class SockConfig
{
	public static inline var IP = '127.0.0.1';// '172.16.17.32';
	public static inline var PORT:UInt = 8090;
	
	public static inline var USER_NAME_LENGTH_MIN:UInt = 2;
	public static inline var USER_NAME_LENGTH_MAX:UInt = 8;
	
	public static inline var ROOM_NAME_LENGTH_MIN:UInt = 3;
	public static inline var ROOM_NAME_LENGTH_MAX:UInt = 5;
	
	public static inline var MSG_LENGTH_MIN:UInt = 1;
	public static inline var MSG_LENGTH_MAX:UInt = 512;
	
	public static inline var ROOM_DEFAULT_NAME = "~home";
	public static inline var ROOM_DEFAULT_IS_ROOM = false;
	
	public static inline var ROOM_COOKIE = false;
	public static inline function USER_NAME_GEN( seed:Int ) {
		
		var v = "aeiouy";
		var c = "bcdfghjklmnpqrstvwxz";
		
		var n = "";
		
		var s = Math.round( Math.random() * Math.floor((USER_NAME_LENGTH_MAX - USER_NAME_LENGTH_MIN)/3) + Math.ceil(USER_NAME_LENGTH_MIN / 3) );
		for ( i in 0...s )
		{
			var r = Math.floor(Math.random() * c.length);
			n += c.charAt( r );
			
			if ( i == 0 )
				n = n.toUpperCase();
				
			r = Math.floor(Math.random() * v.length);
			n += v.charAt( r );
			if ( Math.random() < 0.3 )
			{
				r = Math.floor(Math.random() * c.length);
				n += c.charAt( r );
			}
		}
		
		return n;//"~Guest" + seed;
	};
	
	
	
	/**
	 * Null to disable user registered
	 */
	public static inline var SERVER_USERS_FILE:Null<String> = null;//"users.sqlite";
	public static inline var SERVER_LOGS = false;
	
	/**
	 * Port 843 only for admin.
	 * Required for Flash 10+
	 */
	public static inline var SEND_POLICY_843 = true;
}<commit_msg>Optimize socket config for tchat<commit_after>package dl.socket ;

/**
 * ...
 * @author Namide
 */
class SockConfig
{
	public static var IP = '127.0.0.1';// '172.16.17.32';
	public static var PORT:UInt = 8090;
	
	public static var USER_NAME_LENGTH_MIN:UInt = 2;
	public static var USER_NAME_LENGTH_MAX:UInt = 10;
	
	public static var ROOM_NAME_LENGTH_MIN:UInt = 3;
	public static var ROOM_NAME_LENGTH_MAX:UInt = 10;
	
	public static var MSG_LENGTH_MIN:UInt = 1;
	public static var MSG_LENGTH_MAX:UInt = 512;
	
	public static var ROOM_DEFAULT_NAME = "~home";
	public static var ROOM_DEFAULT_IS_ROOM = true;
	
	public static var ROOM_COOKIE = true;
	public static function USER_NAME_GEN( seed:Int ) {
		
		var v = "aeiouy";
		var c = "bcdfghjklmnpqrstvwxz";
		
		var n = "";
		
		var s = Math.round( Math.random() * Math.floor((USER_NAME_LENGTH_MAX - USER_NAME_LENGTH_MIN)/3) + Math.ceil(USER_NAME_LENGTH_MIN / 3) );
		for ( i in 0...s )
		{
			var r = Math.floor(Math.random() * c.length);
			n += c.charAt( r );
			
			if ( i == 0 )
				n = n.toUpperCase();
				
			r = Math.floor(Math.random() * v.length);
			n += v.charAt( r );
			if ( Math.random() < 0.3 )
			{
				r = Math.floor(Math.random() * c.length);
				n += c.charAt( r );
			}
		}
		
		return n;//"~Guest" + seed;
	};
	
	
	
	/**
	 * Null to disable user registered
	 */
	public static var SERVER_USERS_FILE:Null<String> = null;//"users.sqlite";
	public static var SERVER_LOGS = false;
	
	/**
	 * Port 843 only for admin.
	 * Required for Flash 10+
	 */
	public static var SEND_POLICY_843 = true;
}
{'fraction_non_alphanumeric': 0.13271028037383178, 'fraction_numerical': 0.026168224299065422, 'mean_word_length': 3.0645569620253164, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '3192261', 'n_tokens_mistral': 1389, 'n_tokens_neox': 1174, 'n_words': 311}