rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
if (editor.testRunnerResultCallback) {
if (editor && editor.testRunnerResultCallback) {
TestResult.prototype.post = function() { var editor = SeleniumIDE.Loader.getTopEditor(); if (editor.testRunnerResultCallback) { editor.testRunnerResultCallback(this, window); }};
} else { this.originalPost();
TestResult.prototype.post = function() { var editor = SeleniumIDE.Loader.getTopEditor(); if (editor.testRunnerResultCallback) { editor.testRunnerResultCallback(this, window); }};
saveBlog();
window.setTimeout('saveBlog();', 2000);
function postBlog(id, obj, formid){var bindArgs = { url: "/exec/post/" + obj, content: {ajax: "1"}, mimetype: "text/plain", method: "POST", error: function(type, errObj){ }, load: function(type, data, evt){ // handle successful response here var d = document.getElementById(id); if(!d) return; d.innerHTML = data.toString(); d = document.getElementById("result"); if(d && d.innerHTML == "Success") saveBlog(); } }; if(formid) { var form = document.getElementById(formid); if(form) bindArgs.formNode = form; } // dispatch the request var requestObj = dojo.io.bind(bindArgs); }
resultsUrl = "/postResults";
resultsUrl = "./postResults";
function postTestResults(suiteFailed, suiteTable) { form = document.createElement("form"); document.body.appendChild(form); form.id = "resultsForm"; form.method="post"; var resultsUrl = getQueryParameter("resultsUrl"); if (!resultsUrl) { resultsUrl = "/postResults"; } var actionAndParameters = resultsUrl.split('?',2); form.action = actionAndParameters[0]; var resultsUrlQueryString = actionAndParameters[1]; form.createHiddenField = function(name, value) { input = document.createElement("input"); input.type = "hidden"; input.name = name; input.value = value; this.appendChild(input); }; if (resultsUrlQueryString) { var clauses = resultsUrlQueryString.split('&'); for (var i = 0; i < clauses.length; i++) { var keyValuePair = clauses[i].split('=',2); var key = unescape(keyValuePair[0]); var value = unescape(keyValuePair[1]); form.createHiddenField(key, value); } } form.createHiddenField("result", suiteFailed == true ? "failed" : "passed"); form.createHiddenField("totalTime", Math.floor((currentTime - startTime) / 1000)); form.createHiddenField("numTestPasses", numTestPasses); form.createHiddenField("numTestFailures", numTestFailures); form.createHiddenField("numCommandPasses", numCommandPasses); form.createHiddenField("numCommandFailures", numCommandFailures); form.createHiddenField("numCommandErrors", numCommandErrors); // Create an input for each test table. The inputs are named // testTable.1, testTable.2, etc. for (rowNum = 1; rowNum < suiteTable.rows.length;rowNum++) { // If there is a second column, then add a new input if (suiteTable.rows[rowNum].cells.length > 1) { var resultCell = suiteTable.rows[rowNum].cells[1]; form.createHiddenField("testTable." + rowNum, getText(resultCell)); // remove the resultCell, so it's not included in the suite HTML resultCell.parentNode.removeChild(resultCell); } } // Add HTML for the suite itself form.createHiddenField("suite", suiteTable.parentNode.innerHTML); form.submit(); document.body.removeChild(form);}
form.submit();
if (isQueryParameterTrue("save")) { saveToFile(resultsUrl, form); } else { form.submit(); }
function postTestResults(suiteFailed, suiteTable) { form = document.createElement("form"); document.body.appendChild(form); form.id = "resultsForm"; form.method="post"; form.target="myiframe"; var resultsUrl = getQueryParameter("resultsUrl"); if (!resultsUrl) { resultsUrl = "./postResults"; } var actionAndParameters = resultsUrl.split('?',2); form.action = actionAndParameters[0]; var resultsUrlQueryString = actionAndParameters[1]; form.createHiddenField = function(name, value) { input = document.createElement("input"); input.type = "hidden"; input.name = name; input.value = value; this.appendChild(input); }; if (resultsUrlQueryString) { var clauses = resultsUrlQueryString.split('&'); for (var i = 0; i < clauses.length; i++) { var keyValuePair = clauses[i].split('=',2); var key = unescape(keyValuePair[0]); var value = unescape(keyValuePair[1]); form.createHiddenField(key, value); } } form.createHiddenField("selenium.version", Selenium.version); form.createHiddenField("selenium.revision", Selenium.revision); form.createHiddenField("result", suiteFailed == true ? "failed" : "passed"); form.createHiddenField("totalTime", Math.floor((currentTime - startTime) / 1000)); form.createHiddenField("numTestPasses", numTestPasses); form.createHiddenField("numTestFailures", numTestFailures); form.createHiddenField("numCommandPasses", numCommandPasses); form.createHiddenField("numCommandFailures", numCommandFailures); form.createHiddenField("numCommandErrors", numCommandErrors); // Create an input for each test table. The inputs are named // testTable.1, testTable.2, etc. for (rowNum = 1; rowNum < suiteTable.rows.length;rowNum++) { // If there is a second column, then add a new input if (suiteTable.rows[rowNum].cells.length > 1) { var resultCell = suiteTable.rows[rowNum].cells[1]; form.createHiddenField("testTable." + rowNum, resultCell.innerHTML); // remove the resultCell, so it's not included in the suite HTML resultCell.parentNode.removeChild(resultCell); } } // Add HTML for the suite itself form.createHiddenField("suite", suiteTable.parentNode.innerHTML); form.submit(); document.body.removeChild(form);}
if (isQueryParameterTrue("close")) { window.top.close(); }
function postTestResults(suiteFailed, suiteTable) { form = document.createElement("form"); document.body.appendChild(form); form.id = "resultsForm"; form.method="post"; form.target="myiframe"; var resultsUrl = getQueryParameter("resultsUrl"); if (!resultsUrl) { resultsUrl = "./postResults"; } var actionAndParameters = resultsUrl.split('?',2); form.action = actionAndParameters[0]; var resultsUrlQueryString = actionAndParameters[1]; form.createHiddenField = function(name, value) { input = document.createElement("input"); input.type = "hidden"; input.name = name; input.value = value; this.appendChild(input); }; if (resultsUrlQueryString) { var clauses = resultsUrlQueryString.split('&'); for (var i = 0; i < clauses.length; i++) { var keyValuePair = clauses[i].split('=',2); var key = unescape(keyValuePair[0]); var value = unescape(keyValuePair[1]); form.createHiddenField(key, value); } } form.createHiddenField("selenium.version", Selenium.version); form.createHiddenField("selenium.revision", Selenium.revision); form.createHiddenField("result", suiteFailed == true ? "failed" : "passed"); form.createHiddenField("totalTime", Math.floor((currentTime - startTime) / 1000)); form.createHiddenField("numTestPasses", numTestPasses); form.createHiddenField("numTestFailures", numTestFailures); form.createHiddenField("numCommandPasses", numCommandPasses); form.createHiddenField("numCommandFailures", numCommandFailures); form.createHiddenField("numCommandErrors", numCommandErrors); // Create an input for each test table. The inputs are named // testTable.1, testTable.2, etc. for (rowNum = 1; rowNum < suiteTable.rows.length;rowNum++) { // If there is a second column, then add a new input if (suiteTable.rows[rowNum].cells.length > 1) { var resultCell = suiteTable.rows[rowNum].cells[1]; form.createHiddenField("testTable." + rowNum, resultCell.innerHTML); // remove the resultCell, so it's not included in the suite HTML resultCell.parentNode.removeChild(resultCell); } } // Add HTML for the suite itself form.createHiddenField("suite", suiteTable.parentNode.innerHTML); form.submit(); document.body.removeChild(form);}
auxImg.src = ICONPATH + "ftv2folderclosed.gif"; auxImg.src = ICONPATH + "ftv2folderopen.gif"; auxImg.src = ICONPATH + "ftv2doc.gif";
auxImg.src = ICONPATH + ""; auxImg.src = ICONPATH + ""; auxImg.src = ICONPATH + "";
function preLoadIcons() { var auxImg auxImg = new Image(); auxImg.src = ICONPATH + "ftv2vertline.gif"; auxImg.src = ICONPATH + "ftv2mlastnode.gif"; auxImg.src = ICONPATH + "ftv2mnode.gif"; auxImg.src = ICONPATH + "ftv2plastnode.gif"; auxImg.src = ICONPATH + "ftv2pnode.gif"; auxImg.src = ICONPATH + "ftv2blank.gif"; auxImg.src = ICONPATH + "ftv2lastnode.gif"; auxImg.src = ICONPATH + "ftv2node.gif"; auxImg.src = ICONPATH + "ftv2folderclosed.gif"; auxImg.src = ICONPATH + "ftv2folderopen.gif"; auxImg.src = ICONPATH + "ftv2doc.gif";}
auxImg.src = ICONPATH + ""; auxImg.src = ICONPATH + ""; auxImg.src = ICONPATH + "";
function preLoadIcons() { var auxImg auxImg = new Image(); auxImg.src = ICONPATH + "ftv2vertline.gif"; auxImg.src = ICONPATH + "ftv2mlastnode.gif"; auxImg.src = ICONPATH + "ftv2mnode.gif"; auxImg.src = ICONPATH + "ftv2plastnode.gif"; auxImg.src = ICONPATH + "ftv2pnode.gif"; auxImg.src = ICONPATH + "ftv2blank.gif"; auxImg.src = ICONPATH + "ftv2lastnode.gif"; auxImg.src = ICONPATH + "ftv2node.gif"; auxImg.src = ICONPATH + ""; auxImg.src = ICONPATH + ""; auxImg.src = ICONPATH + "";}
this.includeScrollOffsets = true;
prepare: function() { this.deltaX = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; this.deltaY = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; this.includeScrollOffsets = true; },
for (var i = 0; i < this.val.length; i++) sc_prepWriteCircle(this.val[i], symb, nbPointer);
for (var i = 0; i < this.length; i++) sc_prepWriteCircle(this[i], symb, nbPointer);
sc_Vector.prototype.prepWriteCircle = function(symb, nbPointer) { if (this[symb] !== undefined) { this[symb]++; this[symb + "nb"] = nbPointer.nb++; } else { this[symb] = 0; for (var i = 0; i < this.val.length; i++) sc_prepWriteCircle(this.val[i], symb, nbPointer); }};
for (i = 0; i < arguments.length; i++)
for (var i = 0; i < arguments.length; i++)
present: function() { for (i = 0; i < arguments.length; i++) if ($(arguments[i]).value == '') return false; return true; }
var fileName = srcList.options[srcList.selectedIndex].text; var fileName2 = srcList.options[srcList.selectedIndex].value;
var srcOption = srcList.options[(srcList.selectedIndex < 0) ? 0 : srcList.selectedIndex]; var fileName = srcOption.text; var fileName2 = srcOption.value;
function previewImage( list, image, base_path ) { form = document.adminForm; srcList = eval( "form." + list ); srcImage = eval( "document." + image ); var fileName = srcList.options[srcList.selectedIndex].text; var fileName2 = srcList.options[srcList.selectedIndex].value; if (fileName.length == 0 || fileName2.length == 0) { srcImage.src = 'images/blank.gif'; } else { srcImage.src = base_path + fileName2; }}
if (!Calendar.is_ie5)
if (!Calendar.is_ie5 && !Calendar.is_khtml)
Date.prototype.print = function (str) { var m = this.getMonth(); var d = this.getDate(); var y = this.getFullYear(); var wn = this.getWeekNumber(); var w = this.getDay(); var s = {}; var hr = this.getHours(); var pm = (hr >= 12); var ir = (pm) ? (hr - 12) : hr; var dy = this.getDayOfYear(); if (ir == 0) ir = 12; var min = this.getMinutes(); var sec = this.getSeconds(); s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N] s["%A"] = Calendar._DN[w]; // full weekday name s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N] s["%B"] = Calendar._MN[m]; // full month name // FIXME: %c : preferred date and time representation for the current locale s["%C"] = 1 + Math.floor(y / 100); // the century number s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31) s["%e"] = d; // the day of the month (range 1 to 31) // FIXME: %D : american date style: %m/%d/%y // FIXME: %E, %F, %G, %g, %h (man strftime) s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format) s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format) s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366) s["%k"] = hr; // hour, range 0 to 23 (24h format) s["%l"] = ir; // hour, range 1 to 12 (12h format) s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12 s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59 s["%n"] = "\n"; // a newline character s["%p"] = pm ? "PM" : "AM"; s["%P"] = pm ? "pm" : "am"; // FIXME: %r : the time in am/pm notation %I:%M:%S %p // FIXME: %R : the time in 24-hour notation %H:%M s["%s"] = Math.floor(this.getTime() / 1000); s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59 s["%t"] = "\t"; // a tab character // FIXME: %T : the time in 24-hour notation (%H:%M:%S) s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn; s["%u"] = w + 1; // the day of the week (range 1 to 7, 1 = MON) s["%w"] = w; // the day of the week (range 0 to 6, 0 = SUN) // FIXME: %x : preferred date representation for the current locale without the time // FIXME: %X : preferred time representation for the current locale without the date s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99) s["%Y"] = y; // year with the century s["%%"] = "%"; // a literal '%' character var re = /%./g; if (!Calendar.is_ie5) return str.replace(re, function (par) { return s[par] || par; }); var a = str.match(re); for (var i = 0; i < a.length; i++) { var tmp = s[a[i]]; if (tmp) { re = new RegExp(a[i], 'g'); str = str.replace(re, tmp); } } return str;};
header.id = header["message-id"];
header = convert_msg_header(header);
function process_contribution(header, body, list){ // ToDo: apply filtering here? var msgbase=new MsgBase(list.sub); // ToDo: verify author/sender is a list subscriber here if(!msgbase.open()) { error_file.writeln(log(LOG_ERR,format("%s !ERROR %s opening msgbase: %s" ,list.name, msgbase.error, list.sub))); return(false); } // ToDo: Split header.from into separate name/address fields here header.id = header["message-id"]; // Convert to Synchronet-compatible if(!user.compare_ars(msgbase.cfg.moderated_ars)) header.attr |= MSG_MODERATED; if(!msgbase.save_msg(header, body.join('\r\n'))) { log(LOG_ERR,format("%s !ERROR %s saving message to sub: %s" ,list.name, msgbase.error, list.sub)); return(false); } return(true);}
header.subject=header.subject.replace(RegExp("\\["+listname+"\\]\\s*"), "");
header.subject=header.subject.replace(RegExp("\\["+list.name+"\\]\\s*"), "");
function process_contribution(header, body, list){ // ToDo: apply filtering here? var user_list = get_user_list(list); // verify author/sender is a list subscriber here if(find_user(user_list, sender_address)==-1) { error_file.writeln(log(LOG_WARNING,format("ListServer: %s !ERROR %s is not a subscriber" ,list.name, sender_address)));// error_file.writeln();// error_file.writeln("To subscribe to this list, send an e-mail to " // + listserver_address);// error_file.writeln("with \"subscribe " + list.name + "\" in the message body."); return(false); } var msgbase=new MsgBase(list.sub); if(!msgbase.open()) { error_file.writeln(log(LOG_ERR,format("ListServer: %s !ERROR %s opening msgbase: %s" ,list.name, msgbase.error, list.sub))); return(false); } if(msg_area.sub[list.sub.toLowerCase()].is_moderated) header.attr |= MSG_MODERATED; // Remove [listname] from imported subject header.subject=header.subject.replace(RegExp("\\["+listname+"\\]\\s*"), ""); if(!msgbase.save_msg(header, body.join('\r\n'))) { log(LOG_ERR,format("ListServer: %s !ERROR %s saving message to sub: %s" ,list.name, msgbase.error, list.sub)); return(false); } return(true);}
if(!user.compare_ars(msgbase.cfg.moderated_ars))
if(msg_area.sub[list.sub.toLowerCase()].is_moderated)
function process_contribution(header, body, list){ // ToDo: apply filtering here? var user_list = get_user_list(list); // verify author/sender is a list subscriber here if(find_user(user_list, sender_address)==-1) { error_file.writeln(log(LOG_WARNING,format("ListServer: %s !ERROR %s is not a subscriber" ,list.name, sender_address)));// error_file.writeln();// error_file.writeln("To subscribe to this list, send an e-mail to " // + listserver_address);// error_file.writeln("with \"subscribe " + list.name + "\" in the message body."); return(false); } var msgbase=new MsgBase(list.sub); if(!msgbase.open()) { error_file.writeln(log(LOG_ERR,format("ListServer: %s !ERROR %s opening msgbase: %s" ,list.name, msgbase.error, list.sub))); return(false); } // Convert from RFC822 to Synchronet-compatible header = convert_msg_header(header); if(!user.compare_ars(msgbase.cfg.moderated_ars)) header.attr |= MSG_MODERATED; if(!msgbase.save_msg(header, body.join('\r\n'))) { log(LOG_ERR,format("ListServer: %s !ERROR %s saving message to sub: %s" ,list.name, msgbase.error, list.sub)); return(false); } return(true);}
header = convert_msg_header(header);
function process_contribution(header, body, list){ // ToDo: apply filtering here? var user_list = get_user_list(list); // verify author/sender is a list subscriber here if(find_user(user_list, sender_address)==-1) { error_file.writeln(log(LOG_WARNING,format("ListServer: %s !ERROR %s is not a subscriber" ,list.name, sender_address)));// error_file.writeln();// error_file.writeln("To subscribe to this list, send an e-mail to " // + listserver_address);// error_file.writeln("with \"subscribe " + list.name + "\" in the message body."); return(false); } var msgbase=new MsgBase(list.sub); if(!msgbase.open()) { error_file.writeln(log(LOG_ERR,format("ListServer: %s !ERROR %s opening msgbase: %s" ,list.name, msgbase.error, list.sub))); return(false); } // Convert from RFC822 to Synchronet-compatible header = convert_msg_header(header); if(msg_area.sub[list.sub.toLowerCase()].is_moderated) header.attr |= MSG_MODERATED; if(!msgbase.save_msg(header, body.join('\r\n'))) { log(LOG_ERR,format("ListServer: %s !ERROR %s saving message to sub: %s" ,list.name, msgbase.error, list.sub)); return(false); } return(true);}
var htmlText = processFunction(m[1], m[2], comment);
var htmlText = processFunction(m[1], m[5], comment);
function processFile(f, fname, inputdir, out) { var s; var firstLine = true; indexFileArray[fname] = ""; // write the header of the output file out.writeLine('<HTML><HEADER><TITLE>' + fname + '</TITLE><BODY>'); if (inputdir != null) { outstr = '<a name=\"_top_\"></a><pre><a href=\"' + indexFile + '\">Index Files</a> '; outstr += '<a href=\"' + indexFunction + '\">Index Functions</a></pre><hr>'; out.writeLine(outstr); } // process the input file var comment = ""; while ((s = f.readLine()) != null) { var m = s.match(/\/\*\*(.*)/); if (m != null) { // Found a comment start. s = "*" + m[1]; do { m = s.match(/(.*)\*\//); if (m != null) { // Found end of comment. comment += m[1]; break; } // Strip leading whitespace and "*". comment += s.replace(/^\s*\*/, ""); s = f.readLine(); } while (s != null); if (debug) print("Found comment " + comment); if (firstLine) { // We have a comment for the whole file. out.writeLine('<H1>File ' + fname + '</H1>'); out.writeLine(processComment(comment,firstLine,fname)); out.writeLine('<HR>'); firstLine = false; comment = ""; continue; } } // match the beginning of the function // NB we also match functions without a comment! // if we have two comments one after another only the last one will be taken m = s.match(/^\s*function\s+((\w+)|(\w+)(\s+))\(([^)]*)\)/); if (m != null) { // Found a function start var htmlText = processFunction(m[1], m[2], comment); // Save the text in a global variable, so we // can write out a table of contents first. functionDocArray[functionDocArray.length] = {name:m[1], text:htmlText}; // Store the function also in the indexFunctionArray // so we can have a seperate file with the function table of contents if (indexFunctionArray[m[1]]) { // print("ERROR: function: " + m[1] + " is defined more than once!"); // Allow multiple files for a function with (indexFunctionArray[m[1]]) { filename = filename + "|" + fname; // print("filename = " + filename); } } else { indexFunctionArray[m[1]] = {filename:fname}; } //reset comment comment = ""; } firstLine = false; } // Write table of contents. for (var i=0; i < functionDocArray.length; i++) { with (functionDocArray[i]) { out.writeLine('function <A HREF=#' + name + '>' + name + '</A><BR>'); } } out.writeLine('<HR>'); // Now write the saved function documentation. for (i=0; i < functionDocArray.length; i++) { with (functionDocArray[i]) { out.writeLine('<A NAME=' + name + '>'); out.writeLine(text); } } out.writeLine('</BODY></HTML>'); // Now clean up the doc array functionDocArray = []; }
functionDocArray[functionDocArray.length] = {name:m[1], text:htmlText}; if (indexFunctionArray[m[1]]) { with (indexFunctionArray[m[1]]) { filename = filename + "|" + fname; } } else { indexFunctionArray[m[1]] = {filename:fname}; } comment = ""; } firstLine = false;
functionDocArray[functionDocArray.length] = {name:m[1], text:htmlText}; if (indexFunctionArray[m[1]]) { with (indexFunctionArray[m[1]]) { filename = filename + "|" + fname; } } else { indexFunctionArray[m[1]] = {filename:fname}; } comment = ""; } m = s.match(/^\s*(\w*)\.prototype\.(\w*)\s*=\s*function\s*\(([^)]*)\)/); if (m != null) { var htmlText = processPrototypeMethod(m[1], m[2], m[3], comment); functionDocArray[functionDocArray.length] = {name:m[1]+".prototype."+m[2], text:htmlText}; if (indexFunctionArray[m[1]]) { with (indexFunctionArray[m[1]]) { filename = filename + "|" + fname; } } else { indexFunctionArray[m[1]] = {filename:fname}; } comment = ""; } firstLine = false;
function processFile(f, fname, inputdir, out) { var s; var firstLine = true; indexFileArray[fname] = ""; // write the header of the output file out.writeLine('<HTML><HEADER><TITLE>' + fname + '</TITLE><BODY>'); if (inputdir != null) { outstr = '<a name=\"_top_\"></a><pre><a href=\"' + indexFile + '\">Index Files</a> '; outstr += '<a href=\"' + indexFunction + '\">Index Functions</a></pre><hr>'; out.writeLine(outstr); } // process the input file var comment = ""; while ((s = f.readLine()) != null) { var m = s.match(/\/\*\*(.*)/); if (m != null) { // Found a comment start. s = "*" + m[1]; do { m = s.match(/(.*)\*\//); if (m != null) { // Found end of comment. comment += m[1]; break; } // Strip leading whitespace and "*". comment += s.replace(/^\s*\*/, ""); s = f.readLine(); } while (s != null); if (debug) print("Found comment " + comment); if (firstLine) { // We have a comment for the whole file. out.writeLine('<H1>File ' + fname + '</H1>'); out.writeLine(processComment(comment,firstLine,fname)); out.writeLine('<HR>'); firstLine = false; comment = ""; continue; } } // match the beginning of the function // NB we also match functions without a comment! // if we have two comments one after another only the last one will be taken m = s.match(/^\s*function\s+((\w+)|(\w+)(\s+))\(([^)]*)\)/); if (m != null) { // Found a function start var htmlText = processFunction(m[1], m[2], comment); // Save the text in a global variable, so we // can write out a table of contents first. functionDocArray[functionDocArray.length] = {name:m[1], text:htmlText}; // Store the function also in the indexFunctionArray // so we can have a seperate file with the function table of contents if (indexFunctionArray[m[1]]) { // print("ERROR: function: " + m[1] + " is defined more than once!"); // Allow multiple files for a function with (indexFunctionArray[m[1]]) { filename = filename + "|" + fname; // print("filename = " + filename); } } else { indexFunctionArray[m[1]] = {filename:fname}; } //reset comment comment = ""; } firstLine = false; } // Write table of contents. for (var i=0; i < functionDocArray.length; i++) { with (functionDocArray[i]) { out.writeLine('function <A HREF=#' + name + '>' + name + '</A><BR>'); } } out.writeLine('<HR>'); // Now write the saved function documentation. for (i=0; i < functionDocArray.length; i++) { with (functionDocArray[i]) { out.writeLine('<A NAME=' + name + '>'); out.writeLine(text); } } out.writeLine('</BODY></HTML>'); // Now clean up the doc array functionDocArray = []; }
return {lonlat: new OpenLayers.LonLat(parseFloat(floats[0]), parseFloat(floats[1])), id: null};
processXMLNode: function(xmlNode) { //this should be overridden by subclasses // must return an Object with 'id' and 'lonlat' values set },
function progressBar(id) {
function progressBar(id, callback, method) {
function progressBar(id) { var pb = this; this.id = id; this.element = document.createElement('div'); this.element.id = id; this.element.className = 'progress'; this.element.innerHTML = '<div class="percentage"></div>'+ '<div class="status">&nbsp;</div>'+ '<div class="bar"><div class="filled"></div></div>';}
this.method = method ? method : HTTPGet; this.callback = callback;
function progressBar(id) { var pb = this; this.id = id; this.element = document.createElement('div'); this.element.id = id; this.element.className = 'progress'; this.element.innerHTML = '<div class="percentage"></div>'+ '<div class="status">&nbsp;</div>'+ '<div class="bar"><div class="filled"></div></div>';}
this.relayBotToRC("browserbot.recordedPrompts");
self.relayBotToRC("browserbot.recordedPrompts");
windowToModify.prompt = function(message) { browserBot.recordedPrompts.push(message); var result = !browserBot.nextConfirmResult ? null : browserBot.nextPromptResult; browserBot.nextConfirmResult = true; browserBot.nextPromptResult = ''; this.relayBotToRC("browserbot.recordedPrompts"); return result; };
relayBotToRC("browserbot.recordedPrompts");
windowToModify.prompt = function(message) { browserBot.recordedPrompts.push(message); var result = !browserBot.nextConfirmResult ? null : browserBot.nextPromptResult; browserBot.nextConfirmResult = true; browserBot.nextPromptResult = ''; relayBotToRC("browserbot.recordedPrompts"); return result; };
var val = gmPrompt("Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character.", self.listbox.selectedItem.label, "Edit Page");
var val = gmPrompt(manageBundle.getString("promptForEdit.msg"), self.listbox.selectedItem.label, manageBundle.getString("promptForEdit.title"));
function promptForEdit(ev) { var val = gmPrompt("Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character.", self.listbox.selectedItem.label, "Edit Page"); if (val && val != "") { self.listbox.selectedItem.label = val; self.pages[self.listbox.selectedIndex] = val; dirty = true; } }
var val = gmPrompt("Enter a new URL below. You can specify multiple pages using the wildcard (*) character.", "http:
var val = gmPrompt(manageBundle.getString("promptForNewPage.msg"), manageBundle.getString("promptForNewPage.defVal"), manageBundle.getString("promptForNewPage.title"));;
function promptForNewPage(ev) { var val = gmPrompt("Enter a new URL below. You can specify multiple pages using the wildcard (*) character.", "http://foo.com/*", "Add Page"); if (val && val != "") { addPage(val); self.pages.push(val); dirty = true; } }
title = metaDoc.getElementsByTagNameNS("http:
var title = metaDoc.getElementsByTagNameNS("http:
function publication_image_library() { var pageEnvelope = new FlowHelper().getPageEnvelope(cocoon); var pubHelper = new PublicationHelper(pageEnvelope.getPublication()); var allDocs = pubHelper.getAllDocuments(pageEnvelope.getDocument().getArea(), pageEnvelope.getDocument().getLanguage()); var imageInfos = new ArrayList(); for(var i=0; i<allDocs.length; i++) { if(allDocs[i].getId().equals(pageEnvelope.getDocument().getId())) continue; var resourcesMgr = new DefaultResourcesManager(allDocs[i]); var imageResources = resourcesMgr.getImageResources(); for(var j=0; j<imageResources.length; j++) { var metaDoc = org.apache.lenya.xml.DocumentHelper.readDocument(resourcesMgr.getMetaFile(imageResources[j])); title = metaDoc.getElementsByTagNameNS("http://purl.org/dc/elements/1.1/", "title").item(0).getChildNodes().item(0).getNodeValue(); imageInfos.add({ "url" : pageEnvelope.getContext() + "/" + resourcesMgr.getResourceUrl(imageResources[j]), "name" : imageResources[j].getName(), "title" : title, "length" : imageResources[j].length(), "iconUrl" : cocoon.parameters["iconUrl"] }); } } cocoon.sendPage(cocoon.parameters["template"], {"imageInfos" : imageInfos});}
effect.effects[0].element.hide().setStyle(oldStyle); }
effect.effects[0].element.hide(); effect.effects[0].element.setStyle(oldStyle); }
Effect.Puff = function(element) { element = $(element); var oldStyle = { opacity: element.getInlineOpacity(), position: element.getStyle('position') }; return new Effect.Parallel( [ new Effect.Scale(element, 200, { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], Object.extend({ duration: 1.0, beforeSetupInternal: function(effect) { effect.effects[0].element.setStyle({position: 'absolute'}); }, afterFinishInternal: function(effect) { effect.effects[0].element.hide().setStyle(oldStyle); } }, arguments[1] || {}) );}
var oldStyle = { opacity: element.getInlineOpacity(), position: element.getStyle('position') };
var oldStyle = { opacity: element.getInlineOpacity(), position: element.getStyle('position'), top: element.style.top, left: element.style.left, width: element.style.width, height: element.style.height };
Effect.Puff = function(element) { element = $(element); var oldStyle = { opacity: element.getInlineOpacity(), position: element.getStyle('position') }; return new Effect.Parallel( [ new Effect.Scale(element, 200, { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], Object.extend({ duration: 1.0, beforeSetupInternal: function(effect) { effect.effects[0].element.setStyle({position: 'absolute'}); }, afterFinishInternal: function(effect) { effect.effects[0].element.hide(); effect.effects[0].element.setStyle(oldStyle); } }, arguments[1] || {}) );}
effect.effects[0].element.setStyle({position: 'absolute'}); },
Position.absolutize(effect.effects[0].element) },
Effect.Puff = function(element) { element = $(element); var oldStyle = { opacity: element.getInlineOpacity(), position: element.getStyle('position') }; return new Effect.Parallel( [ new Effect.Scale(element, 200, { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], Object.extend({ duration: 1.0, beforeSetupInternal: function(effect) { effect.effects[0].element.setStyle({position: 'absolute'}); }, afterFinishInternal: function(effect) { effect.effects[0].element.hide(); effect.effects[0].element.setStyle(oldStyle); } }, arguments[1] || {}) );}
new Effect.Parallel( [ new Effect.Scale(element, 200, { sync: true, scaleFromCenter: true }), new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0 } ) ], { duration: 1.0, afterUpdate: function(effect)
element = $(element); var oldOpacity = Element.getInlineOpacity(element); var oldPosition = element.style.position; return new Effect.Parallel( [ new Effect.Scale(element, 200, { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], Object.extend({ duration: 1.0, beforeSetupInternal: function(effect)
Effect.Puff = function(element) { new Effect.Parallel( [ new Effect.Scale(element, 200, { sync: true, scaleFromCenter: true }), new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0 } ) ], { duration: 1.0, afterUpdate: function(effect) { effect.effects[0].element.style.position = 'absolute'; }, afterFinish: function(effect) { Element.hide(effect.effects[0].element); } } );}
afterFinish: function(effect) { Element.hide(effect.effects[0].element); } }
afterFinishInternal: function(effect) { Element.hide(effect.effects[0].element); effect.effects[0].element.style.position = oldPosition; Element.setInlineOpacity(effect.effects[0].element, oldOpacity); } }, arguments[1] || {})
Effect.Puff = function(element) { new Effect.Parallel( [ new Effect.Scale(element, 200, { sync: true, scaleFromCenter: true }), new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0 } ) ], { duration: 1.0, afterUpdate: function(effect) { effect.effects[0].element.style.position = 'absolute'; }, afterFinish: function(effect) { Element.hide(effect.effects[0].element); } } );}
{ duration: 3.0,
Object.extend(Object.extend({ duration: 3.0,
Effect.Pulsate = function(element) { var options = arguments[1] || {}; var transition = options.transition || Effect.Transitions.sinoidal; var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) }; reverser.bind(transition); new Effect.Opacity(element, { duration: 3.0, afterFinish: function(effect) { Element.show(effect.element); } }.extend(options).extend({transition: reverser}));}
}.extend(options).extend({transition: reverser}));
}, options), {transition: reverser}));
Effect.Pulsate = function(element) { var options = arguments[1] || {}; var transition = options.transition || Effect.Transitions.sinoidal; var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) }; reverser.bind(transition); new Effect.Opacity(element, { duration: 3.0, afterFinish: function(effect) { Element.show(effect.element); } }.extend(options).extend({transition: reverser}));}
element = $(element);
Effect.Pulsate = function(element) { var options = arguments[1] || {}; var transition = options.transition || Effect.Transitions.sinoidal; var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) }; reverser.bind(transition); return new Effect.Opacity(element, Object.extend(Object.extend({ duration: 3.0, afterFinish: function(effect) { Element.show(effect.element); } }, options), {transition: reverser}));}
new Effect.Opacity(element, Object.extend(Object.extend({ duration: 3.0, afterFinish: function(effect) { Element.show(effect.element); }
return new Effect.Opacity(element, Object.extend(Object.extend({ duration: 3.0, from: 0, afterFinishInternal: function(effect) { Element.setInlineOpacity(effect.element, oldOpacity); }
Effect.Pulsate = function(element) { var options = arguments[1] || {}; var transition = options.transition || Effect.Transitions.sinoidal; var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) }; reverser.bind(transition); new Effect.Opacity(element, Object.extend(Object.extend({ duration: 3.0, afterFinish: function(effect) { Element.show(effect.element); } }, options), {transition: reverser}));}
afterFinishInternal: function(effect) { Element.setStyle(el, {opacity: oldOpacity}); }
afterFinishInternal: function(effect) { Element.setStyle(effect.element, {opacity: oldOpacity}); }
Effect.Pulsate = function(element) { element = $(element); var options = arguments[1] || {}; var oldOpacity = Element.getInlineOpacity(element); var transition = options.transition || Effect.Transitions.sinoidal; var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) }; reverser.bind(transition); return new Effect.Opacity(element, Object.extend(Object.extend({ duration: 3.0, from: 0, afterFinishInternal: function(effect) { Element.setStyle(el, {opacity: oldOpacity}); } }, options), {transition: reverser}));}
var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) };
var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) };
Effect.Pulsate = function(element) { element = $(element); var options = arguments[1] || {}; var oldOpacity = element.getInlineOpacity(); var transition = options.transition || Effect.Transitions.sinoidal; var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) }; reverser.bind(transition); return new Effect.Opacity(element, Object.extend(Object.extend({ duration: 3.0, from: 0, afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); } }, options), {transition: reverser}));}
Object.extend(Object.extend({ duration: 3.0, from: 0,
Object.extend(Object.extend({ duration: 2.0, from: 0,
Effect.Pulsate = function(element) { element = $(element); var options = arguments[1] || {}; var oldOpacity = element.getInlineOpacity(); var transition = options.transition || Effect.Transitions.sinoidal; var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) }; reverser.bind(transition); return new Effect.Opacity(element, Object.extend(Object.extend({ duration: 3.0, from: 0, afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); } }, options), {transition: reverser}));}
Effect.Transitions.pulse = function(pos) { return (Math.floor(pos*10) % 2 == 0 ? (pos*10-Math.floor(pos*10)) : 1-(pos*10-Math.floor(pos*10)));
Effect.Transitions.pulse = function(pos, pulses) { pulses = pulses || 5; return ( Math.round((pos % (1/pulses)) * pulses) == 0 ? ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) : 1 - ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) );
Effect.Transitions.pulse = function(pos) { return (Math.floor(pos*10) % 2 == 0 ? (pos*10-Math.floor(pos*10)) : 1-(pos*10-Math.floor(pos*10)));}
NickHistory.pop;
NickHistory.pop();
function push_nickbuf(oldnick,newnick) { NickHistory.unshift(new NickBuf(oldnick,newnick)); if(NickHistory.length >= nick_buffer) NickHistory.pop;}
cocoon.sendPage("checkin",{});
sendStatus(201);
function put() { var status = executeUsecase("webdav.put"); if(status) cocoon.sendPage("checkin",{}); else { sendStatus(415); }}
sendStatus(500);
sendStatus(415);
function put() { var status = executeUsecase("webdav.put"); if(status) cocoon.sendPage("checkin",{}); else { sendStatus(500); }}
var text = this.recorder.testManager.getSourceForCommands(commands);
var text = this.editor.testManager.getSourceForCommands(commands);
this.putCommandsToClipboard = function(commands) { var trans = createTransferable(); var str = createClipboardString(); trans.addDataFlavor("text/unicode"); var text = this.recorder.testManager.getSourceForCommands(commands); str.data = text; trans.setTransferData("text/unicode", str, text.length * 2); clipboard.setData(trans, null, Components.interfaces.nsIClipboard.kGlobalClipboard); this.clipboard = commands; window.updateCommands('clipboard'); };
? selectionStart : textArea.length;
? selectionStart : query.length; this.scrollTop = this.selectionStart; this.scrollLeft = 0;
function QueryBufferClass(query, selectionStart, contentSource) { this.query = query; // start at the end this.selectionStart = (null == selectionStart) ? selectionStart : textArea.length; // also track the contentbase and app-server this.contentSource = contentSource; this.getQuery = function() { return this.query; } this.setQuery = function(query) { this.query = query; } this.getSelectionStart = function() { return this.selectionStart; } this.setSelectionStart = function(start) { this.selectionStart = start; } this.getContentSource = function() { return this.contentSource; } this.setContentSource = function(v) { if (null == v) { return; } this.contentSource = v; } this.toXml = function() { var name = "query"; var xml ="<" + name; if (null != this.contentSource) { xml += " content-source=\"" + escapeXml(this.contentSource) + "\""; } xml += ">" + escapeXml(this.query) + "</" + name + ">\n"; return xml; }} // QueryBufferClass
this.setSelectionStart = function(start) {
this.setPosition = function(start, top, left) { debug.print("QueryBufferClass.setPosition: " + start + ", " + top + ", " + left);
function QueryBufferClass(query, selectionStart, contentSource) { this.query = query; // start at the end this.selectionStart = (null == selectionStart) ? selectionStart : textArea.length; // also track the contentbase and app-server this.contentSource = contentSource; this.getQuery = function() { return this.query; } this.setQuery = function(query) { this.query = query; } this.getSelectionStart = function() { return this.selectionStart; } this.setSelectionStart = function(start) { this.selectionStart = start; } this.getContentSource = function() { return this.contentSource; } this.setContentSource = function(v) { if (null == v) { return; } this.contentSource = v; } this.toXml = function() { var name = "query"; var xml ="<" + name; if (null != this.contentSource) { xml += " content-source=\"" + escapeXml(this.contentSource) + "\""; } xml += ">" + escapeXml(this.query) + "</" + name + ">\n"; return xml; }} // QueryBufferClass
this.scrollTop = top; this.scrollLeft = left;
function QueryBufferClass(query, selectionStart, contentSource) { this.query = query; // start at the end this.selectionStart = (null == selectionStart) ? selectionStart : textArea.length; // also track the contentbase and app-server this.contentSource = contentSource; this.getQuery = function() { return this.query; } this.setQuery = function(query) { this.query = query; } this.getSelectionStart = function() { return this.selectionStart; } this.setSelectionStart = function(start) { this.selectionStart = start; } this.getContentSource = function() { return this.contentSource; } this.setContentSource = function(v) { if (null == v) { return; } this.contentSource = v; } this.toXml = function() { var name = "query"; var xml ="<" + name; if (null != this.contentSource) { xml += " content-source=\"" + escapeXml(this.contentSource) + "\""; } xml += ">" + escapeXml(this.query) + "</" + name + ">\n"; return xml; }} // QueryBufferClass
if (!aIID.equals(nsIWebProgressListener) && !aIID.equals(nsISupportsWeakReference) && !aIID.equals(nsISupports))
if (!aIID.equals(Components.interfaces.nsIWebProgressListener) && !aIID.equals(Components.interfaces.nsISupportsWeakReference) && !aIID.equals(Components.interfaces.nsISupports))
QueryInterface : function(aIID) { if (!aIID.equals(nsIWebProgressListener) && !aIID.equals(nsISupportsWeakReference) && !aIID.equals(nsISupports)) { throw Components.results.NS_ERROR_NO_INTERFACE; } return this; },
ajax.send('index.php?mod=Quick_Message&mode=ajax_refresh', null);
ajax.send('ajax.php?mod=Quick_Message&mode=ajax_refresh', null);
function quick_message_refresh(){ ajax = new core_ajax(); var onreadystatechange = function() { if (ajax.state_ready() && ajax.responseText()) { var area = document.getElementById('qm_block'); area.innerHTML = ajax.responseText(); } } ajax.onreadystatechange(onreadystatechange); ajax.send('index.php?mod=Quick_Message&mode=ajax_refresh', null);}
ajax.send('index.php?mod=Quick_Message&mode=ajax_add', poster_name + '&message=' + message.value);
ajax.send('ajax.php?mod=Quick_Message&mode=ajax_add', poster_name + '&message=' + message.value);
function quick_message_submit(){ var message = document.getElementById('message'); var poster_name = document.getElementById('poster_name'); ajax = new core_ajax(); if (!ajax) { return true; } var onreadystatechange = function() { if (ajax.state_ready() && ajax.responseText()) { var area = document.getElementById('qm_block'); area.innerHTML = ajax.responseText(); message.value = ''; } } ajax.onreadystatechange(onreadystatechange); poster_name = (poster_name) ? 'poster_name=' + poster_name.value : ''; ajax.send('index.php?mod=Quick_Message&mode=ajax_add', poster_name + '&message=' + message.value); return false;}
case '\x02':
function quote_mode(){ var i; var select_mode=false; var select_start=0; quote_height=parseInt(lines_on_screen/2)-1; /* Rounds down */ var curr_ypos=ypos-topline+edit_top; /* Decide if quote window should go at top or at bottom */ if(curr_ypos>edit_top+quote_height) quote_ontop=true; else quote_ontop=false; if(quote_ontop) { quote_sep_pos=edit_top+quote_height; quote_window_displayed=edit_top; quote_top=edit_top; quote_bottom=quote_sep_pos-1; } else { quote_sep_pos=edit_bottom-quote_height; quote_window_displayed=quote_sep_pos; quote_top=quote_sep_pos+1; quote_bottom=edit_bottom; } for(i=0;i<quote_line.length;i++) quote_line[i].selected=false; draw_quote_window(); while(1) { set_cursor(); key=console.inkey(0,10000); if(key=='') continue; switch(key) { case 'a': case 'A': case '\x01': /* A and CTRL-A -- Select all */ for(i=0;i<quote_line.length;i++) quote_line[i].selected=true; for(i=0; i< quote_height; i++) draw_quote_selection(quote_topline+i); break; case 'n': case 'N': case '\x0e': /* Unselect all */ for(i=0;i<quote_line.length;i++) quote_line[i].selected=false; for(i=0; i< quote_height; i++) draw_quote_selection(quote_topline+i); break; case '\x12': /* CTRL-R (Quick Redraw in SyncEdit) */ redraw_screen(); break; case KEY_HOME: quote_ypos=0; quote_topline=0; draw_quote_window(); break; case KEY_END: quote_ypos=quote_line.length-1; quote_topline=quote_line.length-quote_height; if(quote_topline<0) quote_topline=0; draw_quote_window(); break; case KEY_DOWN: quote_ypos++; if(quote_ypos>=quote_line.length) { quote_ypos=quote_line.length-1; console.beep(); break; } if(select_mode) { if(quote_ypos > select_start) { quote_line[quote_ypos].selected=true; } else { quote_line[quote_ypos-1].selected=false; } } if(quote_ypos>=quote_topline+quote_height) { quote_topline++; draw_quote_window(); break; } draw_quote_selection(quote_ypos-1); draw_quote_selection(quote_ypos); break; case KEY_UP: quote_ypos--; if(quote_ypos<0) { quote_ypos=0; console.beep(); break; } if(select_mode) { if(quote_ypos < select_start) { quote_line[quote_ypos].selected=true; } else { quote_line[quote_ypos+1].selected=false; } } if(quote_ypos<quote_topline) { quote_topline=quote_ypos; draw_quote_window(); break; } draw_quote_selection(quote_ypos+1); draw_quote_selection(quote_ypos); break; case ' ': /* Toggle selection of current line */ quote_line[quote_ypos].selected=!quote_line[quote_ypos].selected; draw_quote_selection(quote_ypos); break; case 'B': case 'b': case '\x02': /* B or CTRL-B toggles "block" mode */ select_mode=!select_mode; if(select_mode) { select_start=quote_ypos; quote_line[quote_ypos].selected=true; draw_quote_selection(quote_ypos); } break; case '\x0d': /* CR */ for(i=0; i<quote_line.length-1; i++) { if(quote_line[i].selected) { line.splice(ypos,0,quote_line[i]); ypos++; } } quote_window_displayed=0; redraw_screen(); return(false); case '\x1f': case '\x11': /* CTRL-Q (XOff) (Quick Abort in SyncEdit) */ return(true); case '\x18': /* CTRL-X (PgDn in SyncEdit) */ quote_ypos+=quote_height-1; quote_topline+=quote_height-1; if(quote_ypos>=quote_line.length) quote_ypos=quote_line.length-1; if(quote_topline+quote_height>quote_line.length) quote_topline=quote_line.length-quote_height; if(quote_topline<0) quote_topline=0; draw_quote_window(); break; case '\x19': /* CTRL-Y (Delete Line in SyncEdit) */ quote_ypos-=quote_height-1; quote_topline-=quote_height-1; if(quote_ypos<0) quote_ypos=0; if(quote_topline<0) quote_topline=0; draw_quote_window(); break; case '\x1a': /* CTRL-Z (EOF) (PgUp in SyncEdit) */ quote_ypos-=quote_height-1; quote_topline-=quote_height-1; if(quote_ypos<0) quote_ypos=0; if(quote_topline<0) quote_topline=0; draw_quote_window(); break; } }}
case '\x19': quote_ypos-=quote_height-1; quote_topline-=quote_height-1; if(quote_ypos<0) quote_ypos=0; if(quote_topline<0) quote_topline=0; draw_quote_window(); break;
function quote_mode(){ var i; var select_mode=false; var select_start=0; quote_height=parseInt(lines_on_screen/2)-1; /* Rounds down */ var curr_ypos=ypos-topline+edit_top; /* Decide if quote window should go at top or at bottom */ if(curr_ypos>edit_top+quote_height) quote_ontop=true; else quote_ontop=false; if(quote_ontop) { quote_sep_pos=edit_top+quote_height; quote_window_displayed=edit_top; quote_top=edit_top; quote_bottom=quote_sep_pos-1; } else { quote_sep_pos=edit_bottom-quote_height; quote_window_displayed=quote_sep_pos; quote_top=quote_sep_pos+1; quote_bottom=edit_bottom; } for(i=0;i<quote_line.length;i++) quote_line[i].selected=false; draw_quote_window(); while(1) { set_cursor(); key=console.inkey(0,10000); if(key=='') continue; switch(key) { case 'a': case 'A': case '\x01': /* A and CTRL-A -- Select all */ for(i=0;i<quote_line.length;i++) quote_line[i].selected=true; for(i=0; i< quote_height; i++) draw_quote_selection(quote_topline+i); break; case 'n': case 'N': case '\x0e': /* Unselect all */ for(i=0;i<quote_line.length;i++) quote_line[i].selected=false; for(i=0; i< quote_height; i++) draw_quote_selection(quote_topline+i); break; case '\x12': /* CTRL-R (Quick Redraw in SyncEdit) */ redraw_screen(); break; case KEY_HOME: quote_ypos=0; quote_topline=0; draw_quote_window(); break; case KEY_END: quote_ypos=quote_line.length-1; quote_topline=quote_line.length-quote_height; if(quote_topline<0) quote_topline=0; draw_quote_window(); break; case KEY_DOWN: quote_ypos++; if(quote_ypos>=quote_line.length) { quote_ypos=quote_line.length-1; console.beep(); break; } if(select_mode) { if(quote_ypos > select_start) { quote_line[quote_ypos].selected=true; } else { quote_line[quote_ypos-1].selected=false; } } if(quote_ypos>=quote_topline+quote_height) { quote_topline++; draw_quote_window(); break; } draw_quote_selection(quote_ypos-1); draw_quote_selection(quote_ypos); break; case KEY_UP: quote_ypos--; if(quote_ypos<0) { quote_ypos=0; console.beep(); break; } if(select_mode) { if(quote_ypos < select_start) { quote_line[quote_ypos].selected=true; } else { quote_line[quote_ypos+1].selected=false; } } if(quote_ypos<quote_topline) { quote_topline=quote_ypos; draw_quote_window(); break; } draw_quote_selection(quote_ypos+1); draw_quote_selection(quote_ypos); break; case ' ': /* Toggle selection of current line */ quote_line[quote_ypos].selected=!quote_line[quote_ypos].selected; draw_quote_selection(quote_ypos); break; case 'B': case 'b': case '\x02': /* B or CTRL-B toggles "block" mode */ select_mode=!select_mode; if(select_mode) { select_start=quote_ypos; quote_line[quote_ypos].selected=true; draw_quote_selection(quote_ypos); } break; case '\x0d': /* CR */ for(i=0; i<quote_line.length-1; i++) { if(quote_line[i].selected) { line.splice(ypos,0,quote_line[i]); ypos++; } } quote_window_displayed=0; redraw_screen(); return(false); case '\x1f': case '\x11': /* CTRL-Q (XOff) (Quick Abort in SyncEdit) */ return(true); case '\x18': /* CTRL-X (PgDn in SyncEdit) */ quote_ypos+=quote_height-1; quote_topline+=quote_height-1; if(quote_ypos>=quote_line.length) quote_ypos=quote_line.length-1; if(quote_topline+quote_height>quote_line.length) quote_topline=quote_line.length-quote_height; if(quote_topline<0) quote_topline=0; draw_quote_window(); break; case '\x19': /* CTRL-Y (Delete Line in SyncEdit) */ quote_ypos-=quote_height-1; quote_topline-=quote_height-1; if(quote_ypos<0) quote_ypos=0; if(quote_topline<0) quote_topline=0; draw_quote_window(); break; case '\x1a': /* CTRL-Z (EOF) (PgUp in SyncEdit) */ quote_ypos-=quote_height-1; quote_topline-=quote_height-1; if(quote_ypos<0) quote_ypos=0; if(quote_topline<0) quote_topline=0; draw_quote_window(); break; } }}
for(i=0; i<quote_line.length-1; i++) {
for(i=0; i<quote_line.length; i++) {
function quote_mode(){ var i; var select_mode=false; var select_start=0; quote_height=parseInt(lines_on_screen/2)-1; /* Rounds down */ var curr_ypos=ypos-topline+edit_top; /* Decide if quote window should go at top or at bottom */ if(curr_ypos>edit_top+quote_height) quote_ontop=true; else quote_ontop=false; if(quote_ontop) { quote_sep_pos=edit_top+quote_height; quote_window_displayed=edit_top; quote_top=edit_top; quote_bottom=quote_sep_pos-1; } else { quote_sep_pos=edit_bottom-quote_height; quote_window_displayed=quote_sep_pos; quote_top=quote_sep_pos+1; quote_bottom=edit_bottom; } for(i=0;i<quote_line.length;i++) quote_line[i].selected=false; draw_quote_window(); while(1) { set_cursor(); key=console.inkey(0,10000); if(key=='') continue; switch(key) { case 'a': case 'A': case '\x01': /* A and CTRL-A -- Select all */ for(i=0;i<quote_line.length;i++) quote_line[i].selected=true; for(i=0; i< quote_height; i++) draw_quote_selection(quote_topline+i); break; case 'n': case 'N': case '\x0e': /* Unselect all */ for(i=0;i<quote_line.length;i++) quote_line[i].selected=false; for(i=0; i< quote_height; i++) draw_quote_selection(quote_topline+i); break; case '\x12': /* CTRL-R (Quick Redraw in SyncEdit) */ redraw_screen(); break; case KEY_HOME: quote_ypos=0; quote_topline=0; draw_quote_window(); break; case KEY_END: quote_ypos=quote_line.length-1; quote_topline=quote_line.length-quote_height; if(quote_topline<0) quote_topline=0; draw_quote_window(); break; case KEY_DOWN: quote_ypos++; if(quote_ypos>=quote_line.length) { quote_ypos=quote_line.length-1; console.beep(); break; } if(select_mode) { if(quote_ypos > select_start) { quote_line[quote_ypos].selected=true; } else { quote_line[quote_ypos-1].selected=false; } } if(quote_ypos>=quote_topline+quote_height) { quote_topline++; draw_quote_window(); break; } draw_quote_selection(quote_ypos-1); draw_quote_selection(quote_ypos); break; case KEY_UP: quote_ypos--; if(quote_ypos<0) { quote_ypos=0; console.beep(); break; } if(select_mode) { if(quote_ypos < select_start) { quote_line[quote_ypos].selected=true; } else { quote_line[quote_ypos+1].selected=false; } } if(quote_ypos<quote_topline) { quote_topline=quote_ypos; draw_quote_window(); break; } draw_quote_selection(quote_ypos+1); draw_quote_selection(quote_ypos); break; case ' ': /* Toggle selection of current line */ quote_line[quote_ypos].selected=!quote_line[quote_ypos].selected; draw_quote_selection(quote_ypos); break; case 'B': /* B toggles "block" mode */ case 'b': select_mode=!select_mode; if(select_mode) { select_start=quote_ypos; quote_line[quote_ypos].selected=true; draw_quote_selection(quote_ypos); } break; case '\x0d': /* CR */ for(i=0; i<quote_line.length-1; i++) { if(quote_line[i].selected) { line.splice(ypos,0,quote_line[i]); ypos++; if(ypos-topline >= lines_on_screen) topline++; } } quote_window_displayed=0; redraw_screen(); return(false); case '\x1f': case '\x11': /* CTRL-Q (XOff) (Quick Abort in SyncEdit) */ return(true); case '\x10': /* CTRL-P */ quote_ypos+=quote_height-1; quote_topline+=quote_height-1; if(quote_ypos>=quote_line.length) quote_ypos=quote_line.length-1; if(quote_topline+quote_height>quote_line.length) quote_topline=quote_line.length-quote_height; if(quote_topline<0) quote_topline=0; draw_quote_window(); break; case '\x0f': /* CTRL-O */ quote_ypos-=quote_height-1; quote_topline-=quote_height-1; if(quote_ypos<0) quote_ypos=0; if(quote_topline<0) quote_topline=0; draw_quote_window(); break; case '\x0b': /* CTRL-K */ console.attributes=7; if(quote_ontop) console.gotoxy(1,quote_sep_pos+1); else console.gotoxy(1,edit_top); console.cleartoeol(); console.write("\r\nQuote mode keys:"); console.cleartoeol(); console.write("\r\n CTRL-B - Move to begining of message CTRL-^ - Move up one line"); console.cleartoeol(); console.write("\r\n CTRL-E - Move to end of message CTRL-_ - Quick exit (no save)"); console.cleartoeol(); console.write("\r\n CTRL-J - Move down one line SPACE - Select/Unselect current line"); console.cleartoeol(); console.write("\r\n CTRL-O - Move up one page ENTER - Paste lines into message"); console.cleartoeol(); console.write("\r\n CTRL-P - Move down one page A - Select all"); console.cleartoeol(); console.write("\r\n CTRL-Q - Quick exit (no save) B - Toggle block select mode"); console.cleartoeol(); console.write("\r\n CTRL-R - Redraw screen N - Unselect all"); console.cleartoeol(); console.write('\r\n'); console.cleartoeol(); console.write('\r\n'); console.write("Press any key to return to editing.."); console.cleartoeol(); console.write('\r\n'); console.cleartoeol(); console.up(); console.right(37); console.getkey(); redraw_screen(); break; } }}
if(ypos-topline > lines_on_screen)
if(ypos-topline >= lines_on_screen)
function quote_mode(){ var i; var select_mode=false; var select_start=0; quote_height=parseInt(lines_on_screen/2)-1; /* Rounds down */ var curr_ypos=ypos-topline+edit_top; /* Decide if quote window should go at top or at bottom */ if(curr_ypos>edit_top+quote_height) quote_ontop=true; else quote_ontop=false; if(quote_ontop) { quote_sep_pos=edit_top+quote_height; quote_window_displayed=edit_top; quote_top=edit_top; quote_bottom=quote_sep_pos-1; } else { quote_sep_pos=edit_bottom-quote_height; quote_window_displayed=quote_sep_pos; quote_top=quote_sep_pos+1; quote_bottom=edit_bottom; } for(i=0;i<quote_line.length;i++) quote_line[i].selected=false; draw_quote_window(); while(1) { set_cursor(); key=console.inkey(0,10000); if(key=='') continue; switch(key) { case 'a': case 'A': case '\x01': /* A and CTRL-A -- Select all */ for(i=0;i<quote_line.length;i++) quote_line[i].selected=true; for(i=0; i< quote_height; i++) draw_quote_selection(quote_topline+i); break; case 'n': case 'N': case '\x0e': /* Unselect all */ for(i=0;i<quote_line.length;i++) quote_line[i].selected=false; for(i=0; i< quote_height; i++) draw_quote_selection(quote_topline+i); break; case '\x12': /* CTRL-R (Quick Redraw in SyncEdit) */ redraw_screen(); break; case KEY_HOME: quote_ypos=0; quote_topline=0; draw_quote_window(); break; case KEY_END: quote_ypos=quote_line.length-1; quote_topline=quote_line.length-quote_height; if(quote_topline<0) quote_topline=0; draw_quote_window(); break; case KEY_DOWN: quote_ypos++; if(quote_ypos>=quote_line.length) { quote_ypos=quote_line.length-1; console.beep(); break; } if(select_mode) { if(quote_ypos > select_start) { quote_line[quote_ypos].selected=true; } else { quote_line[quote_ypos-1].selected=false; } } if(quote_ypos>=quote_topline+quote_height) { quote_topline++; draw_quote_window(); break; } draw_quote_selection(quote_ypos-1); draw_quote_selection(quote_ypos); break; case KEY_UP: quote_ypos--; if(quote_ypos<0) { quote_ypos=0; console.beep(); break; } if(select_mode) { if(quote_ypos < select_start) { quote_line[quote_ypos].selected=true; } else { quote_line[quote_ypos+1].selected=false; } } if(quote_ypos<quote_topline) { quote_topline=quote_ypos; draw_quote_window(); break; } draw_quote_selection(quote_ypos+1); draw_quote_selection(quote_ypos); break; case ' ': /* Toggle selection of current line */ quote_line[quote_ypos].selected=!quote_line[quote_ypos].selected; draw_quote_selection(quote_ypos); break; case 'B': /* B toggles "block" mode */ case 'b': select_mode=!select_mode; if(select_mode) { select_start=quote_ypos; quote_line[quote_ypos].selected=true; draw_quote_selection(quote_ypos); } break; case '\x0d': /* CR */ for(i=0; i<quote_line.length-1; i++) { if(quote_line[i].selected) { line.splice(ypos,0,quote_line[i]); ypos++; if(ypos-topline > lines_on_screen) topline++; } } quote_window_displayed=0; redraw_screen(); return(false); case '\x1f': case '\x11': /* CTRL-Q (XOff) (Quick Abort in SyncEdit) */ return(true); case '\x18': /* CTRL-X (PgDn in SyncEdit) */ quote_ypos+=quote_height-1; quote_topline+=quote_height-1; if(quote_ypos>=quote_line.length) quote_ypos=quote_line.length-1; if(quote_topline+quote_height>quote_line.length) quote_topline=quote_line.length-quote_height; if(quote_topline<0) quote_topline=0; draw_quote_window(); break; case '\x1a': /* CTRL-Z (EOF) (PgUp in SyncEdit) */ quote_ypos-=quote_height-1; quote_topline-=quote_height-1; if(quote_ypos<0) quote_ypos=0; if(quote_topline<0) quote_topline=0; draw_quote_window(); break; } }}
var val = Convert (ctrl_value, DataType);
var val = Convert (ctrl_value, DataType, validator);
function RangeValidatorEvaluateIsValid (validator){ var MinimumValue = parseInt (validator.getAttribute ("minimumvalue")); var MaximumValue = parseInt (validator.getAttribute ("maximumvalue")); var ControlToValidate = validator.getAttribute ("controltovalidate"); var DataType = validator.getAttribute ("datatype"); var ctrl_value = ValidatorTrim (ValidatorGetValue (ControlToValidate)); if (ctrl_value == "") { ValidatorSucceeded (validator); return true; } var val = Convert (ctrl_value, DataType); if (val == null || val < MinimumValue || val > MaximumValue) { ValidatorFailed (validator); return false; } else { ValidatorSucceeded (validator); return true; }}
if (!this.sendq.bytes && !sendsock.send(str + "\r\n"))
if (this.sendq.bytes || !sendsock.send(str + "\r\n"))
function rawout(str) { var sendsock; var str_end; var str_beg; if (debug) log(format("[RAW->%s]: %s",this.nick,str)); if (this.local) { sendsock = this.socket; } else if (!this.local) { if ((str[0] == ":") && str[0].match(["!"])) { str_end = str.slice(str.indexOf(" ")+1); str_beg = str.slice(0,str.indexOf("!")); str = str_beg + " " + str_end; } sendsock = Servers[this.parent.toLowerCase()].socket; } else { log(LOG_ERR,"!ERROR: No socket to send to?"); return 0; } if (!this.sendq.bytes && !sendsock.send(str + "\r\n")) this.sendq.add(str);}
sendsock = Servers[this.parent].socket;
sendsock = Servers[this.parent.toLowerCase()].socket;
function rawout(str) { var sendsock; var str_end; var str_beg; if (debug) log(format("[RAW->%s]: %s",this.nick,str)); if (this.local) { sendsock = this.socket; } else if (!this.local) { if ((str[0] == ":") && str[0].match(["!"])) { str_end = str.slice(str.indexOf(" ")+1); str_beg = str.slice(0,str.indexOf("!")); str = str_beg + " " + str_end; } sendsock = Servers[this.parent].socket; } else { log("!ERROR: No socket to send to?"); return 0; } if (!writeout(sendsock,str)) this.flagged_for_quit = "Socket write failed miserably";}
log ("WARNING! No config file found or unable to open. Proceeding with defaults.");
log ("WARNING! No config file found or unable to open." + " Proceeding with defaults.");
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}
OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5]));
OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],parseInt(arg[5])));
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading Config: " + fname); while (!conf.eof) { conf_line = conf.readln(); if ((conf_line != null) && conf_line.match("[:]")) { 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],arg[5])); break; case "K": if (!arg[2]) break; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5])); 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 "#": 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);
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading Config: " + fname); while (!conf.eof) { conf_line = conf.readln(); if ((conf_line != null) && conf_line.match("[:]")) { 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],arg[5])); break; case "K": if (!arg[2]) break; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5])); 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 "#": case ";": default: break; } } } conf.close(); } else { log ("WARNING! No config file found or unable to open. Proceeding with defaults."); } scan_for_klined_clients();}
OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],parseInt(arg[5])));
OLines.push(new OLine(arg[1],arg[2],arg[3],parse_oline_flags(arg[4]),parseInt(arg[5])));
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); ILines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); diepass = ""; restartpass = ""; YLines = new Array(); ZLines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading Config: " + fname); while (!conf.eof) { conf_line = conf.readln(); if ((conf_line != null) && conf_line.match("[:]")) { 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],arg[5])); 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; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],parseInt(arg[5]))); 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}
conf_line = conf.readln();
var conf_line = conf.readln();
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) 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"; } var conf = new File(fname); if (conf.open("r")) { log("Reading Config: " + fname); while (!conf.eof) { conf_line = conf.readln(); if ((conf_line != null) && conf_line.match("[:]")) { 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],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; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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}
arg = conf_line.split(":");
var arg = conf_line.split(":");
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) 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"; } var conf = new File(fname); if (conf.open("r")) { log("Reading Config: " + fname); while (!conf.eof) { conf_line = conf.readln(); if ((conf_line != null) && conf_line.match("[:]")) { 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],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; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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}
CLines.push(new CLine(arg[1],arg[2],arg[3],arg[4],arg[5]));
CLines.push(new CLine(arg[1],arg[2],arg[3],arg[4],parseInt(arg[5])));
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) 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"; } var conf = new File(fname); if (conf.open("r")) { log("Reading Config: " + fname); while (!conf.eof) { conf_line = conf.readln(); if ((conf_line != null) && conf_line.match("[:]")) { 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],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; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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}
kline_mask = create_ban_mask(arg[1],true);
var kline_mask = create_ban_mask(arg[1],true);
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) 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"; } var conf = new File(fname); if (conf.open("r")) { log("Reading Config: " + fname); while (!conf.eof) { conf_line = conf.readln(); if ((conf_line != null) && conf_line.match("[:]")) { 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],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; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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}
log("Reading " + fname);
log("Reading Config: " + fname);
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading " + fname); while (!conf.eof) { conf_line = conf.readln(); if (conf_line == null) break; 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],arg[5])); break; case "K": if (!arg[2]) break; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5])); 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 "#": case ";": default: break; } } conf.close(); } else { log ("WARNING! No config file found or unable to open. Proceeding with defaults."); } scan_for_klined_clients();}
if (conf_line == null) break; 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])
if ((conf_line != null) && conf_line.match("[:]")) { 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];
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading " + fname); while (!conf.eof) { conf_line = conf.readln(); if (conf_line == null) break; 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],arg[5])); break; case "K": if (!arg[2]) break; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5])); 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 "#": case ";": default: break; } } conf.close(); } else { log ("WARNING! No config file found or unable to open. Proceeding with defaults."); } scan_for_klined_clients();}
Admin1 = arg[1]; Admin2 = arg[2]; Admin3 = arg[3]; break; case "C": if (!arg[5])
case "C": if (!arg[5]) break; CLines.push(new CLine(arg[1],arg[2],arg[3],arg[4],arg[5]));
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading " + fname); while (!conf.eof) { conf_line = conf.readln(); if (conf_line == null) break; 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],arg[5])); break; case "K": if (!arg[2]) break; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5])); 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 "#": case ";": default: break; } } conf.close(); } else { log ("WARNING! No config file found or unable to open. Proceeding with defaults."); } scan_for_klined_clients();}
CLines.push(new CLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "K": if (!arg[2])
case "K": if (!arg[2]) break; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!WARNING Invalid K:Line (" + arg[1] + ")"); break; } KLines.push(new KLine(kline_mask,arg[2],"K"));
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading " + fname); while (!conf.eof) { conf_line = conf.readln(); if (conf_line == null) break; 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],arg[5])); break; case "K": if (!arg[2]) break; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5])); 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 "#": case ";": default: break; } } conf.close(); } else { log ("WARNING! No config file found or unable to open. Proceeding with defaults."); } scan_for_klined_clients();}
kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!WARNING Invalid K:Line (" + arg[1] + ")");
case "M": if (!arg[3]) break; servername = arg[1]; serverdesc = arg[3];
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading " + fname); while (!conf.eof) { conf_line = conf.readln(); if (conf_line == null) break; 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],arg[5])); break; case "K": if (!arg[2]) break; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5])); 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 "#": case ";": default: break; } } conf.close(); } else { log ("WARNING! No config file found or unable to open. Proceeding with defaults."); } scan_for_klined_clients();}
} KLines.push(new KLine(kline_mask,arg[2],"K")); break; case "M": if (!arg[3])
case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5]));
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading " + fname); while (!conf.eof) { conf_line = conf.readln(); if (conf_line == null) break; 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],arg[5])); break; case "K": if (!arg[2]) break; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5])); 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 "#": case ";": default: break; } } conf.close(); } else { log ("WARNING! No config file found or unable to open. Proceeding with defaults."); } scan_for_klined_clients();}
servername = arg[1]; serverdesc = arg[3]; break; case "N": if (!arg[5])
case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5]));
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading " + fname); while (!conf.eof) { conf_line = conf.readln(); if (conf_line == null) break; 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],arg[5])); break; case "K": if (!arg[2]) break; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5])); 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 "#": case ";": default: break; } } conf.close(); } else { log ("WARNING! No config file found or unable to open. Proceeding with defaults."); } scan_for_klined_clients();}
NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5])
case "Q": if (!arg[3]) break; QLines.push(new QLine(arg[3],arg[2]));
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading " + fname); while (!conf.eof) { conf_line = conf.readln(); if (conf_line == null) break; 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],arg[5])); break; case "K": if (!arg[2]) break; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5])); 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 "#": case ";": default: break; } } conf.close(); } else { log ("WARNING! No config file found or unable to open. Proceeding with defaults."); } scan_for_klined_clients();}
OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "Q": if (!arg[3])
case "U": if (!arg[1]) break; ULines.push(arg[1]);
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading " + fname); while (!conf.eof) { conf_line = conf.readln(); if (conf_line == null) break; 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],arg[5])); break; case "K": if (!arg[2]) break; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5])); 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 "#": case ";": default: break; } } conf.close(); } else { log ("WARNING! No config file found or unable to open. Proceeding with defaults."); } scan_for_klined_clients();}
QLines.push(new QLine(arg[3],arg[2])); break; case "U": if (!arg[1])
case "#": case ";": default:
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading " + fname); while (!conf.eof) { conf_line = conf.readln(); if (conf_line == null) break; 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],arg[5])); break; case "K": if (!arg[2]) break; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5])); 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 "#": case ";": default: break; } } conf.close(); } else { log ("WARNING! No config file found or unable to open. Proceeding with defaults."); } scan_for_klined_clients();}
ULines.push(arg[1]); break; case "#": case ";": default: break;
}
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading " + fname); while (!conf.eof) { conf_line = conf.readln(); if (conf_line == null) break; 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],arg[5])); break; case "K": if (!arg[2]) break; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],arg[5])); 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 "#": case ";": default: break; } } conf.close(); } else { log ("WARNING! No config file found or unable to open. Proceeding with defaults."); } scan_for_klined_clients();}
if (config_filename && config_filename.length) fname=system.ctrl_dir + config_filename; else {
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 {
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) 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"; } var conf = new File(fname); if (conf.open("r")) { log("Reading Config: " + fname); 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("!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}
log("Reading Config: " + fname);
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) 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"; } var conf = new File(fname); if (conf.open("r")) { log("Reading Config: " + fname); 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("!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}
case "X": diepass = arg[1]; restartpass = arg[2]; break;
function read_config_file() { Admin1 = ""; Admin2 = ""; Admin3 = ""; CLines = new Array(); ILines = new Array(); KLines = new Array(); NLines = new Array(); OLines = new Array(); QLines = new Array(); ULines = new Array(); YLines = new Array(); ZLines = new Array(); fname=""; if (config_filename && config_filename.length) 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"; } conf = new File(fname); if (conf.open("r")) { log("Reading Config: " + fname); while (!conf.eof) { conf_line = conf.readln(); if ((conf_line != null) && conf_line.match("[:]")) { 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],arg[5])); 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; kline_mask = create_ban_mask(arg[1],true); if (!kline_mask) { log("!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]; break; case "N": if (!arg[5]) break; NLines.push(new NLine(arg[1],arg[2],arg[3],arg[4],arg[5])); break; case "O": if (!arg[5]) break; OLines.push(new OLine(arg[1],arg[2],arg[3],arg[4],parseInt(arg[5]))); 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 "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}
printf("rsp: %s",rsp);
printf("rsp: %s\r\n",rsp);
function readln(str){ rsp = socket.readln(); if(debug) printf("rsp: %s",rsp); return(rsp);}
}
},
readURL: function(url) { var stream = this.openURLInputStream(url); var content = stream.read(stream.available()); stream.close(); return content; }
NewWindow('/addTimerEvent?ref=' + ref + 'start=' + start + '&duration=' + duration + '&descr=' + description + '&channel=' + channel, 'record', '200', '200', 'no', '5000');
NewWindow('/addTimerEvent?ref=' + ref + '&start=' + start + '&duration=' + duration + '&descr=' + description + '&channel=' + channel, 'record', '200', '200', 'no', '5000');
function record(ref, start, duration, description, channel){ NewWindow('/addTimerEvent?ref=' + ref + 'start=' + start + '&duration=' + duration + '&descr=' + description + '&channel=' + channel, 'record', '200', '200', 'no', '5000');}
this.recordPageLoad = function() {
this.recordPageLoad = function(elementOrWindow) {
this.recordPageLoad = function() { LOG.debug("Page load detected"); try { LOG.debug("Page load location=" + self.getCurrentWindow(true).location); } catch (e) { LOG.error("Caught an exception attempting to log location; this should get noticed soon!"); LOG.exception(e); self.pageLoadError = e; return; } self.currentPage = null; self.newPageLoaded = true; };
LOG.debug("Page load location=" + self.getCurrentWindow(true).location);
if (elementOrWindow.location && elementOrWindow.location.href) { LOG.debug("Page load location=" + elementOrWindow.location.href); } else if (elementOrWindow.contentWindow && elementOrWindow.contentWindow.location && elementOrWindow.contentWindow.location.href) { LOG.debug("Page load location=" + elementOrWindow.contentWindow.location.href); } else { LOG.debug("Page load location unknown, current window location=" + this.getCurrentWindow(true).location); }
this.recordPageLoad = function() { LOG.debug("Page load detected"); try { LOG.debug("Page load location=" + self.getCurrentWindow(true).location); } catch (e) { LOG.error("Caught an exception attempting to log location; this should get noticed soon!"); LOG.exception(e); self.pageLoadError = e; return; } self.currentPage = null; self.newPageLoaded = true; };
LOG.debug("Page load detected, location=" + self.getCurrentWindow().location);
LOG.debug("Page load detected"); try { LOG.debug("Page load location=" + self.getCurrentWindow().location); } catch (e) { self.pageLoadError = e; return; }
this.recordPageLoad = function() { LOG.debug("Page load detected, location=" + self.getCurrentWindow().location); self.currentPage = null; self.newPageLoaded = true; };
LOG.debug("Page load detected");
LOG.debug("Page load detected, location=" + self.getCurrentWindow().location);
this.recordPageLoad = function() { LOG.debug("Page load detected"); self.currentPage = null; self.newPageLoaded = true; };
LOG.error("Caught an exception attempting to log location; this should get noticed soon!"); LOG.exception(e);
this.recordPageLoad = function() { LOG.debug("Page load detected"); try { LOG.debug("Page load location=" + self.getCurrentWindow(true).location); } catch (e) { self.pageLoadError = e; return; } self.currentPage = null; self.newPageLoaded = true; };
addCommand("assertTitle", window.document.title, null, window);
addCommand("assertTitle", exactMatchPattern(window.document.title), null, window);
function recordTitle(window) { if (this.options.recordAssertTitle == 'true' && this.testCase.commands.length > 0) { //setTimeout("addCommand", 200, "assertTitle", window.document.title, null, window); addCommand("assertTitle", window.document.title, null, window); }}
debug("recoverQueryBuffers: start");
debug.print("recoverQueryBuffers: start");
function recoverQueryBuffers() { // given a list of buffers, import them debug("recoverQueryBuffers: start"); var bufCookie = getCookie(g_cq_buffers_cookie); if (bufCookie != null) { var buffersNode = document.getElementById(g_cq_buffers_area_id); debug("recoverQueryBuffers: " + bufCookie); if (! buffersNode) { debug("recoverQueryBuffers: null buffersNode"); return; } buffersNode.innerHTML = bufCookie; }}
debug("recoverQueryBuffers: " + bufCookie);
debug.print("recoverQueryBuffers: " + bufCookie);
function recoverQueryBuffers() { // given a list of buffers, import them debug("recoverQueryBuffers: start"); var bufCookie = getCookie(g_cq_buffers_cookie); if (bufCookie != null) { var buffersNode = document.getElementById(g_cq_buffers_area_id); debug("recoverQueryBuffers: " + bufCookie); if (! buffersNode) { debug("recoverQueryBuffers: null buffersNode"); return; } buffersNode.innerHTML = bufCookie; }}
debug("recoverQueryBuffers: null buffersNode");
debug.print("recoverQueryBuffers: null buffersNode");
function recoverQueryBuffers() { // given a list of buffers, import them debug("recoverQueryBuffers: start"); var bufCookie = getCookie(g_cq_buffers_cookie); if (bufCookie != null) { var buffersNode = document.getElementById(g_cq_buffers_area_id); debug("recoverQueryBuffers: " + bufCookie); if (! buffersNode) { debug("recoverQueryBuffers: null buffersNode"); return; } buffersNode.innerHTML = bufCookie; }}
debug("recoverQueryHistory: start");
debug.print("recoverQueryHistory: start");
function recoverQueryHistory() { // given a list of queries, put them in the history debug("recoverQueryHistory: start"); var histCookie = getCookie(g_cq_history_cookie); if (histCookie != null) { var listNode = getQueryHistoryListNode(true); if (! listNode) { debug("recoverQueryHistory: null listNode"); return; } listNode.innerHTML = histCookie; }}
debug("recoverQueryHistory: null listNode");
debug.print("recoverQueryHistory: null listNode");
function recoverQueryHistory() { // given a list of queries, put them in the history debug("recoverQueryHistory: start"); var histCookie = getCookie(g_cq_history_cookie); if (histCookie != null) { var listNode = getQueryHistoryListNode(true); if (! listNode) { debug("recoverQueryHistory: null listNode"); return; } listNode.innerHTML = histCookie; }}
var iframe = document.createElement('iframe');
var div = document.createElement('div'); div.innerHTML = '<iframe name="redirect-target" id="redirect-target" class="redirect"></iframe>'; var iframe = div.firstChild;
function redirectFormButton(uri, button, handler) { // Insert the iframe var iframe = document.createElement('iframe'); with (iframe) { name = 'redirect-target'; setAttribute('name', 'redirect-target'); id = 'redirect-target'; } with (iframe.style) { position = 'absolute'; height = '1px'; width = '1px'; visibility = 'hidden'; } document.body.appendChild(iframe); // Trap the button button.onfocus = function() { button.onclick = function() { // Prepare variables for use in anonymous function. var button = this; var action = button.form.action; var target = button.form.target; // Redirect form submission this.form.action = uri; this.form.target = 'redirect-target'; handler.onsubmit(); // Set iframe handler for later window.iframeHandler = function (data) { // Restore form submission button.form.action = action; button.form.target = target; handler.oncomplete(data); } return true; } } button.onblur = function() { button.onclick = null; }}
button.onfocus = function() {
button.onmouseover = button.onfocus = function() {
function redirectFormButton(uri, button, handler) { // Insert the iframe var iframe = document.createElement('iframe'); with (iframe) { name = 'redirect-target'; setAttribute('name', 'redirect-target'); id = 'redirect-target'; } with (iframe.style) { position = 'absolute'; height = '1px'; width = '1px'; visibility = 'hidden'; } document.body.appendChild(iframe); // Trap the button button.onfocus = function() { button.onclick = function() { // Prepare variables for use in anonymous function. var button = this; var action = button.form.action; var target = button.form.target; // Redirect form submission this.form.action = uri; this.form.target = 'redirect-target'; handler.onsubmit(); // Set iframe handler for later window.iframeHandler = function (data) { // Restore form submission button.form.action = action; button.form.target = target; handler.oncomplete(data); } return true; } } button.onblur = function() { button.onclick = null; }}
button.onblur = function() {
button.onmouseout = button.onblur = function() {
function redirectFormButton(uri, button, handler) { // Insert the iframe var iframe = document.createElement('iframe'); with (iframe) { name = 'redirect-target'; setAttribute('name', 'redirect-target'); id = 'redirect-target'; } with (iframe.style) { position = 'absolute'; height = '1px'; width = '1px'; visibility = 'hidden'; } document.body.appendChild(iframe); // Trap the button button.onfocus = function() { button.onclick = function() { // Prepare variables for use in anonymous function. var button = this; var action = button.form.action; var target = button.form.target; // Redirect form submission this.form.action = uri; this.form.target = 'redirect-target'; handler.onsubmit(); // Set iframe handler for later window.iframeHandler = function (data) { // Restore form submission button.form.action = action; button.form.target = target; handler.oncomplete(data); } return true; } } button.onblur = function() { button.onclick = null; }}
var div = document.createElement('div'); div.innerHTML = '<iframe name="redirect-target" id="redirect-target" src="" style="width:0px;height:0px;border:0;"></iframe>'; button.parentNode.appendChild(div);
var iframe = document.createElement('iframe'); with (iframe) { name = 'redirect-target'; setAttribute('name', 'redirect-target'); id = 'redirect-target'; } with (iframe.style) { position = 'absolute'; height = '1px'; width = '1px'; visibility = 'hidden'; } document.body.appendChild(iframe);
function redirectFormButton(uri, button, handler) { // Insert the iframe var div = document.createElement('div'); div.innerHTML = '<iframe name="redirect-target" id="redirect-target" src="" style="width:0px;height:0px;border:0;"></iframe>'; button.parentNode.appendChild(div); // Trap the button button.onfocus = function() { button.onclick = function() { // Prepare vars for use in anonymous function. var button = this; var action = button.form.action; var target = button.form.target; // Redirect form submission this.form.action = uri; this.form.target = 'redirect-target'; handler.onsubmit(); // Set iframe handler for later window.iframeHandler = function (data) { // Restore form submission button.form.action = action; button.form.target = target; handler.oncomplete(data); } } } button.onblur = function() { button.onclick = null; }}
return true;
function redirectFormButton(uri, button, handler) { // Insert the iframe var div = document.createElement('div'); div.innerHTML = '<iframe name="redirect-target" id="redirect-target" src="" style="width:0px;height:0px;border:0;"></iframe>'; button.parentNode.appendChild(div); // Trap the button button.onfocus = function() { button.onclick = function() { // Prepare vars for use in anonymous function. var button = this; var action = button.form.action; var target = button.form.target; // Redirect form submission this.form.action = uri; this.form.target = 'redirect-target'; handler.onsubmit(); // Set iframe handler for later window.iframeHandler = function (data) { // Restore form submission button.form.action = action; button.form.target = target; handler.oncomplete(data); } } } button.onblur = function() { button.onclick = null; }}
response = response.replace(/[\f\n\r\t\v]/g, ' ');
function redirectFormButton(uri, button, handler) { // Make sure we have an iframe to target createIframe(); // Trap the button button.onmouseover = button.onfocus = function() { button.onclick = function() { // Prepare variables for use in anonymous function. var button = this; var action = button.form.action; var target = button.form.target; // Redirect form submission this.form.action = uri; this.form.target = 'redirect-target'; handler.onsubmit(); // Set iframe handler for later window.iframeHandler = function () { var iframe = $('redirect-target'); // Restore form submission button.form.action = action; button.form.target = target; // Get response from iframe body try { response = (iframe.contentWindow || iframe.contentDocument || iframe).document.body.innerHTML; if (window.opera) { // Opera-hack: it returns innerHTML sanitized. response = response.replace(/&quot;/g, '"'); } } catch (e) { response = null; } // Recreate the iframe: re-using an old iframe can sometimes cause browser bugs. createIframe(); response = parseJson(response); // Check response code if (response.status == 0) { handler.onerror(response.data); return; } handler.oncomplete(response.data); } return true; } } button.onmouseout = button.onblur = function() { button.onclick = null; }}
if (!(baseLayer && checked)) { Event.observe(labelSpan, "click", this.onLabelClick.bindAsEventListener(inputElem)); }
Event.observe(labelSpan, "click", this.onLabelClick.bindAsEventListener(inputElem));
redraw: function() { //clear out previous layers this.baseLayersDiv.innerHTML = ""; this.baseLayerInputs = new Array(); this.dataLayersDiv.innerHTML = ""; this.dataLayerInputs = new Array(); var containsOverlays = false; for( var i = 0; i < this.map.layers.length; i++) { var layer = this.map.layers[i]; var baseLayer = layer.isBaseLayer; if (!baseLayer) { containsOverlays = true; } // only check a baselayer if it is *the* baselayer, check data // layers if they are visible var checked = (baseLayer) ? (layer == this.map.baseLayer) : layer.getVisibility(); // create input element var inputElem = document.createElement("input"); inputElem.id = "input_" + layer.name; inputElem.name = (baseLayer) ? "baseLayers" : layer.name; inputElem.type = (baseLayer) ? "radio" : "checkbox"; inputElem.value = layer.name; inputElem.checked = checked; inputElem.layer = layer; // create span var labelSpan = document.createElement("span"); labelSpan.innerHTML = layer.name; labelSpan.style.verticalAlign = (baseLayer) ? "bottom" : "auto"; if (!(baseLayer && checked)) { Event.observe(labelSpan, "click", this.onLabelClick.bindAsEventListener(inputElem)); } // create line break var br = document.createElement("br"); var groupArray = (baseLayer) ? this.baseLayerInputs : this.dataLayerInputs; groupArray.push(inputElem); var groupDiv = (baseLayer) ? this.baseLayersDiv : this.dataLayersDiv; groupDiv.appendChild(inputElem); groupDiv.appendChild(labelSpan); groupDiv.appendChild(br); } // if no overlays, dont display the overlay label this.dataLbl.style.display = (containsOverlays) ? "" : "none"; return this.div; },