rem: log ("WARNING! No config file found or unable to open.  Proceeding with defaults."); 
add: log ("WARNING! No config file found or unable to open." + " Proceeding with defaults."); 
context: function read_config_file() {	Admin1 = "";	Admin2 = "";	Admin3 = "";	CLines = new Array;	HLines = new Array;	ILines = new Array;	KLines = new Array;	NLines = new Array;	OLines = new Array;	PLines = new Array;	QLines = new Array;	ULines = new Array;	diepass = "";	restartpass = "";	YLines = new Array;	ZLines = new Array;	var fname="";	if (config_filename && config_filename.length) {		if(config_filename.indexOf('/')>=0 || config_filename.indexOf('\\')>=0)			fname=config_filename;		else			fname=system.ctrl_dir + config_filename;	} else {		fname=system.ctrl_dir + "ircd." + system.local_host_name + ".conf";		if(!file_exists(fname))			fname=system.ctrl_dir + "ircd." + system.host_name + ".conf";		if(!file_exists(fname))			fname=system.ctrl_dir + "ircd.conf";	}	log(LOG_INFO,"Reading Config: " + fname);	var conf = new File(fname);	if (conf.open("r")) {		while (!conf.eof) {			var conf_line = conf.readln();			if ((conf_line != null) && conf_line.match("[:]")) {				var arg = conf_line.split(":");				for(argument in arg) {					arg[argument]=arg[argument].replace(						/SYSTEM_HOST_NAME/g,system.host_name);					arg[argument]=arg[argument].replace(						/SYSTEM_NAME/g,system.name);					arg[argument]=arg[argument].replace(						/SYSTEM_QWKID/g,system.qwk_id.toLowerCase());					arg[argument]=arg[argument].replace(						/VERSION_NOTICE/g,system.version_notice);				}				switch (conf_line[0].toUpperCase()) {					case "A":						if (!arg[3])							break;						Admin1 = arg[1];						Admin2 = arg[2];						Admin3 = arg[3];						break;					case "C":						if (!arg[5])							break;						CLines.push(new CLine(arg[1],arg[2],arg[3],arg[4],parseInt(arg[5])));						break;					case "H":						if (!arg[3])							break;						HLines.push(new HLine(arg[1],arg[3]));						break;					case "I":						if (!arg[5])							break;						ILines.push(new ILine(arg[1],arg[2],arg[3],arg[4],arg[5]));						break;					case "K":						if (!arg[2])							break;						var kline_mask = create_ban_mask(arg[1],true);						if (!kline_mask) {							log(LOG_WARNING,"!WARNING Invalid K:Line (" + arg[1] + ")");							break;						}						KLines.push(new KLine(kline_mask,arg[2],"K"));						break;					case "M":						if (!arg[3])							break;						servername = arg[1];						serverdesc = arg[3];						mline_port = parseInt(arg[4]);						break;					case "N":						if (!arg[5])							break;						NLines.push(new NLine(arg[1],arg[2],arg[3],parse_nline_flags(arg[4]),arg[5]));						break;					case "O":						if (!arg[5])							break;						OLines.push(new OLine(arg[1],arg[2],arg[3],parse_oline_flags(arg[4]),parseInt(arg[5])));						break;					case "P":						PLines.push(parseInt(arg[4]));						break;					case "Q":						if (!arg[3])							break;						QLines.push(new QLine(arg[3],arg[2]));						break;					case "U":						if (!arg[1])							break;						ULines.push(arg[1]);						break;					case "X":						diepass = arg[1];						restartpass = arg[2];						break;					case "Y":						if (!arg[5])							break;						YLines[parseInt(arg[1])] = new YLine(parseInt(arg[2]),parseInt(arg[3]),parseInt(arg[4]),parseInt(arg[5]));						break;					case "Z":						if (!arg[2])							break;						ZLines.push(new ZLine(arg[1],arg[2]));						break;					case "#":					case ";":					default:						break;				}			}		}		conf.close();	} else {		log ("WARNING! No config file found or unable to open.  Proceeding with defaults.");	}	scan_for_klined_clients();	YLines[0] = new YLine(120,600,1,5050000); // default irc class}
meta: 9592	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9592/8e827bdecb04679155adebfc0d3059428c1c52a7/ircd.js/buggy/ircd.js