rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
if ( a[i].constructor == String ) { a[i] = jQuery.trim(a[i]); var table = ""; | if ( a[i].constructor == String ) { var s = jQuery.trim(a[i]), div = document.createElement("div"), wrap = [0,"",""]; | clean: function(a) { var r = []; for ( var i = 0; i < a.length; i++ ) { if ( a[i].constructor == String ) { // trim whitespace, otherwise indexOf won't work as expected a[i] = jQuery.trim(a[i]); var table = ""; if ( !a[i].indexOf("<opt") ) { table = "thead"; a[i] = "<select>" + a[i] + "</select>"; } else if ( !a[i].indexOf("<thead") || !a[i].indexOf("<tbody") ) { table = "thead"; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<tr") ) { table = "tr"; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<td") || !a[i].indexOf("<th") ) { table = "td"; a[i] = "<table><tbody><tr>" + a[i] + "</tr></tbody></table>"; } var div = document.createElement("div"); div.innerHTML = a[i]; if ( table ) { div = div.firstChild; if ( table != "thead" ) div = div.firstChild; if ( table == "td" ) div = div.firstChild; } for ( var j = 0; j < div.childNodes.length; j++ ) r.push( div.childNodes[j] ); } else if ( a[i].jquery || a[i].length && !a[i].nodeType ) for ( var k = 0; k < a[i].length; k++ ) r.push( a[i][k] ); else if ( a[i] !== null ) r.push( a[i].nodeType ? a[i] : document.createTextNode(a[i].toString()) ); } return r; }, |
if ( !a[i].indexOf("<opt") ) { table = "thead"; a[i] = "<select>" + a[i] + "</select>"; } else if ( !a[i].indexOf("<thead") || !a[i].indexOf("<tbody") ) { table = "thead"; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<tr") ) { table = "tr"; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<td") || !a[i].indexOf("<th") ) { table = "td"; a[i] = "<table><tbody><tr>" + a[i] + "</tr></tbody></table>"; } | if ( !s.indexOf("<opt") ) wrap = [1, "<select>", "</select>"]; else if ( !s.indexOf("<thead") || !s.indexOf("<tbody") ) wrap = [1, "<table>", "</table>"]; else if ( !s.indexOf("<tr") ) wrap = [2, "<table>", "</table>"]; else if ( !s.indexOf("<td") || !s.indexOf("<th") ) wrap = [3, "<table><tbody><tr>", "</tr></tbody></table>"]; | clean: function(a) { var r = []; for ( var i = 0; i < a.length; i++ ) { if ( a[i].constructor == String ) { // trim whitespace, otherwise indexOf won't work as expected a[i] = jQuery.trim(a[i]); var table = ""; if ( !a[i].indexOf("<opt") ) { table = "thead"; a[i] = "<select>" + a[i] + "</select>"; } else if ( !a[i].indexOf("<thead") || !a[i].indexOf("<tbody") ) { table = "thead"; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<tr") ) { table = "tr"; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<td") || !a[i].indexOf("<th") ) { table = "td"; a[i] = "<table><tbody><tr>" + a[i] + "</tr></tbody></table>"; } var div = document.createElement("div"); div.innerHTML = a[i]; if ( table ) { div = div.firstChild; if ( table != "thead" ) div = div.firstChild; if ( table == "td" ) div = div.firstChild; } for ( var j = 0; j < div.childNodes.length; j++ ) r.push( div.childNodes[j] ); } else if ( a[i].jquery || a[i].length && !a[i].nodeType ) for ( var k = 0; k < a[i].length; k++ ) r.push( a[i][k] ); else if ( a[i] !== null ) r.push( a[i].nodeType ? a[i] : document.createTextNode(a[i].toString()) ); } return r; }, |
var div = document.createElement("div"); div.innerHTML = a[i]; | div.innerHTML = wrap[1] + s + wrap[2]; while ( wrap[0]-- ) div = div.firstChild; a[i] = div.childNodes; } | clean: function(a) { var r = []; for ( var i = 0; i < a.length; i++ ) { if ( a[i].constructor == String ) { // trim whitespace, otherwise indexOf won't work as expected a[i] = jQuery.trim(a[i]); var table = ""; if ( !a[i].indexOf("<opt") ) { table = "thead"; a[i] = "<select>" + a[i] + "</select>"; } else if ( !a[i].indexOf("<thead") || !a[i].indexOf("<tbody") ) { table = "thead"; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<tr") ) { table = "tr"; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<td") || !a[i].indexOf("<th") ) { table = "td"; a[i] = "<table><tbody><tr>" + a[i] + "</tr></tbody></table>"; } var div = document.createElement("div"); div.innerHTML = a[i]; if ( table ) { div = div.firstChild; if ( table != "thead" ) div = div.firstChild; if ( table == "td" ) div = div.firstChild; } for ( var j = 0; j < div.childNodes.length; j++ ) r.push( div.childNodes[j] ); } else if ( a[i].jquery || a[i].length && !a[i].nodeType ) for ( var k = 0; k < a[i].length; k++ ) r.push( a[i][k] ); else if ( a[i] !== null ) r.push( a[i].nodeType ? a[i] : document.createTextNode(a[i].toString()) ); } return r; }, |
if ( table ) { div = div.firstChild; if ( table != "thead" ) div = div.firstChild; if ( table == "td" ) div = div.firstChild; } | if ( a[i].length != undefined && !a[i].nodeType ) for ( var n=0; n < a[i].length; n++ ) r.push(a[i][n]); else if ( a[i] !== null ) r.push( a[i].nodeType ? a[i] : document.createTextNode(a[i].toString()) ); } | clean: function(a) { var r = []; for ( var i = 0; i < a.length; i++ ) { if ( a[i].constructor == String ) { // trim whitespace, otherwise indexOf won't work as expected a[i] = jQuery.trim(a[i]); var table = ""; if ( !a[i].indexOf("<opt") ) { table = "thead"; a[i] = "<select>" + a[i] + "</select>"; } else if ( !a[i].indexOf("<thead") || !a[i].indexOf("<tbody") ) { table = "thead"; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<tr") ) { table = "tr"; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<td") || !a[i].indexOf("<th") ) { table = "td"; a[i] = "<table><tbody><tr>" + a[i] + "</tr></tbody></table>"; } var div = document.createElement("div"); div.innerHTML = a[i]; if ( table ) { div = div.firstChild; if ( table != "thead" ) div = div.firstChild; if ( table == "td" ) div = div.firstChild; } for ( var j = 0; j < div.childNodes.length; j++ ) r.push( div.childNodes[j] ); } else if ( a[i].jquery || a[i].length && !a[i].nodeType ) for ( var k = 0; k < a[i].length; k++ ) r.push( a[i][k] ); else if ( a[i] !== null ) r.push( a[i].nodeType ? a[i] : document.createTextNode(a[i].toString()) ); } return r; }, |
for ( var j = 0; j < div.childNodes.length; j++ ) r.push( div.childNodes[j] ); } else if ( a[i].jquery || a[i].length && !a[i].nodeType ) for ( var k = 0; k < a[i].length; k++ ) r.push( a[i][k] ); else if ( a[i] !== null ) r.push( a[i].nodeType ? a[i] : document.createTextNode(a[i].toString()) ); } | clean: function(a) { var r = []; for ( var i = 0; i < a.length; i++ ) { if ( a[i].constructor == String ) { // trim whitespace, otherwise indexOf won't work as expected a[i] = jQuery.trim(a[i]); var table = ""; if ( !a[i].indexOf("<opt") ) { table = "thead"; a[i] = "<select>" + a[i] + "</select>"; } else if ( !a[i].indexOf("<thead") || !a[i].indexOf("<tbody") ) { table = "thead"; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<tr") ) { table = "tr"; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<td") || !a[i].indexOf("<th") ) { table = "td"; a[i] = "<table><tbody><tr>" + a[i] + "</tr></tbody></table>"; } var div = document.createElement("div"); div.innerHTML = a[i]; if ( table ) { div = div.firstChild; if ( table != "thead" ) div = div.firstChild; if ( table == "td" ) div = div.firstChild; } for ( var j = 0; j < div.childNodes.length; j++ ) r.push( div.childNodes[j] ); } else if ( a[i].jquery || a[i].length && !a[i].nodeType ) for ( var k = 0; k < a[i].length; k++ ) r.push( a[i][k] ); else if ( a[i] !== null ) r.push( a[i].nodeType ? a[i] : document.createTextNode(a[i].toString()) ); } return r; }, |
|
for ( var j = 0; j < div.childNodes.length; j++ ) r.push( div.childNodes[j] ); | arg = div.childNodes; | clean: function(a) { var r = []; for ( var i = 0; i < a.length; i++ ) { var arg = a[i]; if ( arg.constructor == String ) { // Convert html string into DOM nodes // Trim whitespace, otherwise indexOf won't work as expected var s = jQuery.trim(arg), div = document.createElement("div"), wrap = [0,"",""]; if ( !s.indexOf("<opt") ) // option or optgroup wrap = [1, "<select>", "</select>"]; else if ( !s.indexOf("<thead") || !s.indexOf("<tbody") ) wrap = [1, "<table>", "</table>"]; else if ( !s.indexOf("<tr") ) wrap = [2, "<table>", "</table>"]; // tbody auto-inserted else if ( !s.indexOf("<td") || !s.indexOf("<th") ) wrap = [3, "<table><tbody><tr>", "</tr></tbody></table>"]; // Go to html and back, then peel off extra wrappers div.innerHTML = wrap[1] + s + wrap[2]; while ( wrap[0]-- ) div = div.firstChild; // Have to loop through the childNodes here to // prevent a Safari crash with text nodes and /n characters for ( var j = 0; j < div.childNodes.length; j++ ) r.push( div.childNodes[j] ); } else if ( arg.length != undefined && !arg.nodeType ) // Handles Array, jQuery, DOM NodeList collections for ( var n = 0; n < arg.length; n++ ) r.push(arg[n]); else r.push( arg.nodeType ? arg : document.createTextNode(arg.toString()) ); } return r; }, |
else if ( arg.length != undefined && !arg.nodeType ) for ( var n = 0; n < arg.length; n++ ) | if ( arg.length != undefined && ( (jQuery.browser.safari && typeof arg == 'function') || !arg.nodeType ) ) for ( var n = 0; n < arg.length; n++ ) | clean: function(a) { var r = []; for ( var i = 0; i < a.length; i++ ) { var arg = a[i]; if ( arg.constructor == String ) { // Convert html string into DOM nodes // Trim whitespace, otherwise indexOf won't work as expected var s = jQuery.trim(arg), div = document.createElement("div"), wrap = [0,"",""]; if ( !s.indexOf("<opt") ) // option or optgroup wrap = [1, "<select>", "</select>"]; else if ( !s.indexOf("<thead") || !s.indexOf("<tbody") ) wrap = [1, "<table>", "</table>"]; else if ( !s.indexOf("<tr") ) wrap = [2, "<table>", "</table>"]; // tbody auto-inserted else if ( !s.indexOf("<td") || !s.indexOf("<th") ) wrap = [3, "<table><tbody><tr>", "</tr></tbody></table>"]; // Go to html and back, then peel off extra wrappers div.innerHTML = wrap[1] + s + wrap[2]; while ( wrap[0]-- ) div = div.firstChild; // Have to loop through the childNodes here to // prevent a Safari crash with text nodes and /n characters for ( var j = 0; j < div.childNodes.length; j++ ) r.push( div.childNodes[j] ); } else if ( arg.length != undefined && !arg.nodeType ) // Handles Array, jQuery, DOM NodeList collections for ( var n = 0; n < arg.length; n++ ) r.push(arg[n]); else r.push( arg.nodeType ? arg : document.createTextNode(arg.toString()) ); } return r; }, |
if ( td ) { div = div.firstChild; } | if ( td ) div = div.firstChild; | $.clean = function(a) { var r = []; for ( var i = 0; i < a.length; i++ ) { if ( a[i].constructor == String ) { if ( !a[i].indexOf("<tr") ) { var tr = true; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<td") || !a[i].indexOf("<th") ) { var td = true; a[i] = "<table><tbody><tr>" + a[i] + "</tr></tbody></table>"; } var div = document.createElement("div"); div.innerHTML = a[i]; if ( tr || td ) { div = div.firstChild.firstChild; if ( td ) { div = div.firstChild; } } for ( var j = 0; j < div.childNodes.length; j++ ) { r[r.length] = div.childNodes[j]; } } else if ( a[i].length && !a[i].nodeType ) { for ( var k = 0; k < a[i].length; k++ ) { r[r.length] = a[i][k]; } } else if ( a[i] !== null ) { r[r.length] = a[i].nodeType ? a[i] : document.createTextNode(a[i].toString()); } } return r;}; |
for ( var j = 0; j < div.childNodes.length; j++ ) { | for ( var j = 0; j < div.childNodes.length; j++ ) | $.clean = function(a) { var r = []; for ( var i = 0; i < a.length; i++ ) { if ( a[i].constructor == String ) { if ( !a[i].indexOf("<tr") ) { var tr = true; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<td") || !a[i].indexOf("<th") ) { var td = true; a[i] = "<table><tbody><tr>" + a[i] + "</tr></tbody></table>"; } var div = document.createElement("div"); div.innerHTML = a[i]; if ( tr || td ) { div = div.firstChild.firstChild; if ( td ) { div = div.firstChild; } } for ( var j = 0; j < div.childNodes.length; j++ ) { r[r.length] = div.childNodes[j]; } } else if ( a[i].length && !a[i].nodeType ) { for ( var k = 0; k < a[i].length; k++ ) { r[r.length] = a[i][k]; } } else if ( a[i] !== null ) { r[r.length] = a[i].nodeType ? a[i] : document.createTextNode(a[i].toString()); } } return r;}; |
} } else if ( a[i].length && !a[i].nodeType ) { for ( var k = 0; k < a[i].length; k++ ) { | } else if ( a[i].length && !a[i].nodeType ) for ( var k = 0; k < a[i].length; k++ ) | $.clean = function(a) { var r = []; for ( var i = 0; i < a.length; i++ ) { if ( a[i].constructor == String ) { if ( !a[i].indexOf("<tr") ) { var tr = true; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<td") || !a[i].indexOf("<th") ) { var td = true; a[i] = "<table><tbody><tr>" + a[i] + "</tr></tbody></table>"; } var div = document.createElement("div"); div.innerHTML = a[i]; if ( tr || td ) { div = div.firstChild.firstChild; if ( td ) { div = div.firstChild; } } for ( var j = 0; j < div.childNodes.length; j++ ) { r[r.length] = div.childNodes[j]; } } else if ( a[i].length && !a[i].nodeType ) { for ( var k = 0; k < a[i].length; k++ ) { r[r.length] = a[i][k]; } } else if ( a[i] !== null ) { r[r.length] = a[i].nodeType ? a[i] : document.createTextNode(a[i].toString()); } } return r;}; |
} } else if ( a[i] !== null ) { | else if ( a[i] !== null ) | $.clean = function(a) { var r = []; for ( var i = 0; i < a.length; i++ ) { if ( a[i].constructor == String ) { if ( !a[i].indexOf("<tr") ) { var tr = true; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<td") || !a[i].indexOf("<th") ) { var td = true; a[i] = "<table><tbody><tr>" + a[i] + "</tr></tbody></table>"; } var div = document.createElement("div"); div.innerHTML = a[i]; if ( tr || td ) { div = div.firstChild.firstChild; if ( td ) { div = div.firstChild; } } for ( var j = 0; j < div.childNodes.length; j++ ) { r[r.length] = div.childNodes[j]; } } else if ( a[i].length && !a[i].nodeType ) { for ( var k = 0; k < a[i].length; k++ ) { r[r.length] = a[i][k]; } } else if ( a[i] !== null ) { r[r.length] = a[i].nodeType ? a[i] : document.createTextNode(a[i].toString()); } } return r;}; |
} | $.clean = function(a) { var r = []; for ( var i = 0; i < a.length; i++ ) { if ( a[i].constructor == String ) { if ( !a[i].indexOf("<tr") ) { var tr = true; a[i] = "<table>" + a[i] + "</table>"; } else if ( !a[i].indexOf("<td") || !a[i].indexOf("<th") ) { var td = true; a[i] = "<table><tbody><tr>" + a[i] + "</tr></tbody></table>"; } var div = document.createElement("div"); div.innerHTML = a[i]; if ( tr || td ) { div = div.firstChild.firstChild; if ( td ) { div = div.firstChild; } } for ( var j = 0; j < div.childNodes.length; j++ ) { r[r.length] = div.childNodes[j]; } } else if ( a[i].length && !a[i].nodeType ) { for ( var k = 0; k < a[i].length; k++ ) { r[r.length] = a[i][k]; } } else if ( a[i] !== null ) { r[r.length] = a[i].nodeType ? a[i] : document.createTextNode(a[i].toString()); } } return r;}; |
|
return t.replace(/^\s+|\s+$/g, ''); | return t.replace(/^\s+|\s+$/g, ""); | $.cleanSpaces = function(t){ return t.replace(/^\s+|\s+$/g, '');}; |
return true; | function clear () { try { var cs_class = Components.classes['@mozilla.org/consoleservice;1']; var cs_iface = Components.interfaces.nsIConsoleService; var cs_isupports = cs_class.getService(); var cs = cs_isupports.QueryInterface(cs_iface); } catch(exn) { // Couldn't get the console service for some reason... // pretend it never happened. return; } cs.logStringMessage("__CLEAR__"); var tree = document.getElementById("console"); var treeChildren = document.getElementById("consoleTreeChildren"); tree.removeChild(treeChildren); treeChildren = document.createElement ("treechildren"); treeChildren.setAttribute ("id", "consoleTreeChildren"); treeChildren.setAttribute ("flex", "1"); tree.appendChild(treeChildren); num_errors=0; return true; } |
|
node = document.getElementById("fileAttachmentMenu"); | var node = document.getElementById("fileAttachmentMenu"); | function ClearAttachmentList() { // we also have to disable the File/Attachments menuitem node = document.getElementById("fileAttachmentMenu"); if (node) node.setAttribute("disabled", "true"); // clear selection var list = document.getElementById('attachmentList'); list.clearSelection(); while (list.hasChildNodes()) list.removeChild(list.lastChild);} |
attachBox.setAttribute("hide", "true"); | attachBox.setAttribute("collapsed", "true"); | function ClearAttachmentMenu() { var popup = document.getElementById("attachmentPopup"); if ( popup ) { while ( popup.childNodes.length ) popup.removeChild(popup.childNodes[0]); } var attachBox = document.getElementById("attachmentBox"); if (attachBox) attachBox.setAttribute("hide", "true"); // reset attachments name array attachmentUrlArray.length = 0; attachmentDisplayNameArray.length = 0; attachmentMessageUriArray.length = 0;} |
return 0; | return null; | function clearBreakpointByNumber (number){ var bpr = console.breakpoints.childData[number]; if (!bpr) { display (getMsg(MSN_ERR_BP_NOINDEX, number, MT_ERROR)); return 0; } bpr.enabled = false; display (getMsg(MSN_BP_CLEARED, [bpr.fileName, bpr.line, bpr.scriptMatches])); var fileName = bpr.fileName; var line = bpr.line; var sourceRecord = console.scripts[fileName]; if (sourceRecord.sourceText.isLoaded && sourceRecord.sourceText.lines[line - 1]) { delete sourceRecord.sourceText.lines[line - 1].bpRecord; if (console.sourceView.childData.fileName == fileName) console.sourceView.outliner.invalidateRow (line - 1); } console.breakpoints.removeChildAtIndex(number); return bpr.scriptMatches;} |
display (getMsg(MSN_BP_CLEARED, [bpr.fileName, bpr.line, bpr.scriptMatches])); | function clearBreakpointByNumber (number){ var bpr = console.breakpoints.childData[number]; if (!bpr) { display (getMsg(MSN_ERR_BP_NOINDEX, number, MT_ERROR)); return 0; } bpr.enabled = false; display (getMsg(MSN_BP_CLEARED, [bpr.fileName, bpr.line, bpr.scriptMatches])); var fileName = bpr.fileName; var line = bpr.line; var sourceRecord = console.scripts[fileName]; if (sourceRecord.sourceText.isLoaded && sourceRecord.sourceText.lines[line - 1]) { delete sourceRecord.sourceText.lines[line - 1].bpRecord; if (console.sourceView.childData.fileName == fileName) console.sourceView.outliner.invalidateRow (line - 1); } console.breakpoints.removeChildAtIndex(number); return bpr.scriptMatches;} |
|
return bpr.scriptMatches; | return bpr; | function clearBreakpointByNumber (number){ var bpr = console.breakpoints.childData[number]; if (!bpr) { display (getMsg(MSN_ERR_BP_NOINDEX, number, MT_ERROR)); return 0; } bpr.enabled = false; display (getMsg(MSN_BP_CLEARED, [bpr.fileName, bpr.line, bpr.scriptMatches])); var fileName = bpr.fileName; var line = bpr.line; var sourceRecord = console.scripts[fileName]; if (sourceRecord.sourceText.isLoaded && sourceRecord.sourceText.lines[line - 1]) { delete sourceRecord.sourceText.lines[line - 1].bpRecord; if (console.sourceView.childData.fileName == fileName) console.sourceView.outliner.invalidateRow (line - 1); } console.breakpoints.removeChildAtIndex(number); return bpr.scriptMatches;} |
function clearChildNodes(id) | DWRUtil.clearChildNodes = function(id) | function clearChildNodes(id){ var elem = document.getElementById(id); while (elem.childNodes.length > 0) { elem.removeChild(elem.firstChild); }} |
var elem = document.getElementById(id); while (elem.childNodes.length > 0) | var ele = document.getElementById(id); if (ele == null) | function clearChildNodes(id){ var elem = document.getElementById(id); while (elem.childNodes.length > 0) { elem.removeChild(elem.firstChild); }} |
elem.removeChild(elem.firstChild); | alert("clearChildNodes() can't find an element with id: " + id + "."); throw id; } while (ele.childNodes.length > 0) { ele.removeChild(ele.firstChild); | function clearChildNodes(id){ var elem = document.getElementById(id); while (elem.childNodes.length > 0) { elem.removeChild(elem.firstChild); }} |
this.listElement.removeChild(this.listElement.firstChild); | var popup = this.listElement.firstChild; if (popup) { this.listElement.removeChild(popup); } | clearList: function () { // remove the menupopup node child of the menulist. this.listElement.removeChild(this.listElement.firstChild); }, |
if (document.frm_help.check==undefined) { return; } | function clearList() { // uncheck all checkboxes for (box=0; box < document.frm_help.check.length; box++) { document.frm_help.check[box].checked = false; }} |
|
if (GetMessagePaneFrame().location != "about:blank") GetMessagePaneFrame().location = "about:blank"; | if (GetMessagePaneFrame().location.href != "about:blank") GetMessagePaneFrame().location.href = "about:blank"; | function ClearMessagePane(){ if(gHaveLoadedMessage) { gHaveLoadedMessage = false; gCurrentDisplayedMessage = null; if (GetMessagePaneFrame().location != "about:blank") GetMessagePaneFrame().location = "about:blank"; // hide the message header view AND the message pane... HideMessageHeaderPane(); // hide the junk bar SetUpJunkBar(null); }} |
if (GetMessagePaneFrame().location != "about:blank") GetMessagePaneFrame().location = "about:blank"; | if (GetMessagePaneFrame().location.href != "about:blank") GetMessagePaneFrame().location.href = "about:blank"; | function ClearMessagePane(){ if(gHaveLoadedMessage) { gHaveLoadedMessage = false; gCurrentDisplayedMessage = null; if (GetMessagePaneFrame().location != "about:blank") GetMessagePaneFrame().location = "about:blank"; // hide the message header view AND the message pane... HideMessageHeaderPane(); gMessageNotificationBar.clearMsgNotifications(); }} |
if (window.frames["content"].location != "about:blank") window.frames["content"].location = "about:blank"; | if (window.frames["content"].location.href != "about:blank") window.frames["content"].location.href = "about:blank"; | function ClearPrintEnginePane(){ if (window.frames["content"].location != "about:blank") window.frames["content"].location = "about:blank";} |
gSearchInput.setSearchCriteriaText(); | if (gSearchInput) gSearchInput.setSearchCriteriaText(); | function clearQuickSearchAfterFolderChange(){ gSearchInput.setSearchCriteriaText();} |
client.currentObject.display ("User '" + e.inputData + "' not found.", | client.currentObject.display ("User ``" + e.inputData + "'' not found.", | function cli_devoice (e) { if (!e.channel) { client.currentObject.display ("You must be on a channel " + "to use devoice.", "ERROR"); return false; } if (!e.inputData) { var nicksAry = e.channel.getSelectedUsers(); if (nicksAry) { mapObjFunc(nicksAry, "setVoice", false); return true; } else { return false; } } var cuser = e.channel.getUser(e.inputData); if (!cuser) { client.currentObject.display ("User '" + e.inputData + "' not found.", "ERROR"); return false; } cuser.setVoice(false); return true;} |
return true; | function cli_exit (e){ client.quit(e.inputData); window.close(); } |
|
"Using '" + client.lastNetwork.name + "'", "NOTICE"); | "Using ``" + client.lastNetwork.name + "''", "NOTICE"); | function cli_iattach (e){ var net; var pass; if (!e.inputData) { if (client.lastNetwork) { client.currentObject.display ("No network specified network, " + "Using '" + client.lastNetwork.name + "'", "NOTICE"); net = client.lastNetwork; } else { client.currentObject.display ("No network specified, and no " + "default network is in place.", "ERROR"); return false; } } else { var ary = e.inputData.match (/(\S+) ?(\S+)?/); net = client.networks[ary[1]]; pass = ary[2]; if (!net) { client.currentObject.display ("Unknown network '" + e.inputData + "'", "ERROR"); return false; } client.lastNetwork = net; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt ("Please select a nickname", client.defaultNick); net.connect(pass); net.display ("Connecting...", "INFO"); setCurrentObject(net); return true; } |
client.currentObject.display ("Unknown network '" + e.inputData + "'", "ERROR"); | client.currentObject.display ("Unknown network ``" + e.inputData + "''", "ERROR"); | function cli_iattach (e){ var net; var pass; if (!e.inputData) { if (client.lastNetwork) { client.currentObject.display ("No network specified network, " + "Using '" + client.lastNetwork.name + "'", "NOTICE"); net = client.lastNetwork; } else { client.currentObject.display ("No network specified, and no " + "default network is in place.", "ERROR"); return false; } } else { var ary = e.inputData.match (/(\S+) ?(\S+)?/); net = client.networks[ary[1]]; pass = ary[2]; if (!net) { client.currentObject.display ("Unknown network '" + e.inputData + "'", "ERROR"); return false; } client.lastNetwork = net; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt ("Please select a nickname", client.defaultNick); net.connect(pass); net.display ("Connecting...", "INFO"); setCurrentObject(net); return true; } |
net.display ("Connecting...", "INFO"); setCurrentObject(net); | net.display ("Attempting to connect to ``" + net.name + "''. Use /cancel to abort.", "INFO"); | function cli_iattach (e){ var net; var pass; if (!e.inputData) { if (client.lastNetwork) { client.currentObject.display ("No network specified network, " + "Using '" + client.lastNetwork.name + "'", "NOTICE"); net = client.lastNetwork; } else { client.currentObject.display ("No network specified, and no " + "default network is in place.", "ERROR"); return false; } } else { var ary = e.inputData.match (/(\S+) ?(\S+)?/); net = client.networks[ary[1]]; pass = ary[2]; if (!net) { client.currentObject.display ("Unknown network '" + e.inputData + "'", "ERROR"); return false; } client.lastNetwork = net; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt ("Please select a nickname", client.defaultNick); net.connect(pass); net.display ("Connecting...", "INFO"); setCurrentObject(net); return true; } |
var net; var pass; | function cli_iattach (e){ var net; var pass; if (!e.inputData) { if (client.lastNetwork) { client.currentObject.display (getMsg("cli_iattachMsg", client.lastNetwork.name), "NOTICE"); net = client.lastNetwork; } else { client.currentObject.display (getMsg("cli_iattachMsg2"), "ERROR"); return false; } } else { var ary = e.inputData.match (/(\S+) ?(\S+)?/); net = client.networks[ary[1]]; pass = ary[2]; if (!net) { client.currentObject.display (getMsg("cli_iattachMsg3",e.inputData), "ERROR"); return false; } client.lastNetwork = net; } if (!net.messages) net.displayHere (getMsg("cli_iattachMsg4",net.name),"INFO"); setCurrentObject(net); if (net.isConnected()) { net.display (getMsg("cli_iattachMsg5",net.name),"ERROR"); return true; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt (getMsg("cli_iattachMsg6"), client.defaultNick); net.connect(pass); net.display (getMsg("cli_iattachMsg7",net.name), "INFO"); return true; } |
|
if (client.lastNetwork) { client.currentObject.display (getMsg("cli_iattachMsg", client.lastNetwork.name), "NOTICE"); net = client.lastNetwork; } else { client.currentObject.display (getMsg("cli_iattachMsg2"), "ERROR"); return false; } } else { var ary = e.inputData.match (/(\S+) ?(\S+)?/); net = client.networks[ary[1]]; pass = ary[2]; if (!net) { client.currentObject.display (getMsg("cli_iattachMsg3",e.inputData), "ERROR"); return false; } client.lastNetwork = net; | return false; | function cli_iattach (e){ var net; var pass; if (!e.inputData) { if (client.lastNetwork) { client.currentObject.display (getMsg("cli_iattachMsg", client.lastNetwork.name), "NOTICE"); net = client.lastNetwork; } else { client.currentObject.display (getMsg("cli_iattachMsg2"), "ERROR"); return false; } } else { var ary = e.inputData.match (/(\S+) ?(\S+)?/); net = client.networks[ary[1]]; pass = ary[2]; if (!net) { client.currentObject.display (getMsg("cli_iattachMsg3",e.inputData), "ERROR"); return false; } client.lastNetwork = net; } if (!net.messages) net.displayHere (getMsg("cli_iattachMsg4",net.name),"INFO"); setCurrentObject(net); if (net.isConnected()) { net.display (getMsg("cli_iattachMsg5",net.name),"ERROR"); return true; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt (getMsg("cli_iattachMsg6"), client.defaultNick); net.connect(pass); net.display (getMsg("cli_iattachMsg7",net.name), "INFO"); return true; } |
if (!net.messages) net.displayHere (getMsg("cli_iattachMsg4",net.name),"INFO"); setCurrentObject(net); if (net.isConnected()) | if (e.inputData.search(/irc:\/\ e.inputData = "irc: var url = parseIRCURL(e.inputData); if (!url) | function cli_iattach (e){ var net; var pass; if (!e.inputData) { if (client.lastNetwork) { client.currentObject.display (getMsg("cli_iattachMsg", client.lastNetwork.name), "NOTICE"); net = client.lastNetwork; } else { client.currentObject.display (getMsg("cli_iattachMsg2"), "ERROR"); return false; } } else { var ary = e.inputData.match (/(\S+) ?(\S+)?/); net = client.networks[ary[1]]; pass = ary[2]; if (!net) { client.currentObject.display (getMsg("cli_iattachMsg3",e.inputData), "ERROR"); return false; } client.lastNetwork = net; } if (!net.messages) net.displayHere (getMsg("cli_iattachMsg4",net.name),"INFO"); setCurrentObject(net); if (net.isConnected()) { net.display (getMsg("cli_iattachMsg5",net.name),"ERROR"); return true; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt (getMsg("cli_iattachMsg6"), client.defaultNick); net.connect(pass); net.display (getMsg("cli_iattachMsg7",net.name), "INFO"); return true; } |
net.display (getMsg("cli_iattachMsg5",net.name),"ERROR"); return true; | client.currentObject.display (getMsg("badIRCURL", e.inputData), "ERROR"); return false; | function cli_iattach (e){ var net; var pass; if (!e.inputData) { if (client.lastNetwork) { client.currentObject.display (getMsg("cli_iattachMsg", client.lastNetwork.name), "NOTICE"); net = client.lastNetwork; } else { client.currentObject.display (getMsg("cli_iattachMsg2"), "ERROR"); return false; } } else { var ary = e.inputData.match (/(\S+) ?(\S+)?/); net = client.networks[ary[1]]; pass = ary[2]; if (!net) { client.currentObject.display (getMsg("cli_iattachMsg3",e.inputData), "ERROR"); return false; } client.lastNetwork = net; } if (!net.messages) net.displayHere (getMsg("cli_iattachMsg4",net.name),"INFO"); setCurrentObject(net); if (net.isConnected()) { net.display (getMsg("cli_iattachMsg5",net.name),"ERROR"); return true; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt (getMsg("cli_iattachMsg6"), client.defaultNick); net.connect(pass); net.display (getMsg("cli_iattachMsg7",net.name), "INFO"); return true; } |
if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt (getMsg("cli_iattachMsg6"), client.defaultNick); net.connect(pass); net.display (getMsg("cli_iattachMsg7",net.name), "INFO"); | gotoIRCURL (url); | function cli_iattach (e){ var net; var pass; if (!e.inputData) { if (client.lastNetwork) { client.currentObject.display (getMsg("cli_iattachMsg", client.lastNetwork.name), "NOTICE"); net = client.lastNetwork; } else { client.currentObject.display (getMsg("cli_iattachMsg2"), "ERROR"); return false; } } else { var ary = e.inputData.match (/(\S+) ?(\S+)?/); net = client.networks[ary[1]]; pass = ary[2]; if (!net) { client.currentObject.display (getMsg("cli_iattachMsg3",e.inputData), "ERROR"); return false; } client.lastNetwork = net; } if (!net.messages) net.displayHere (getMsg("cli_iattachMsg4",net.name),"INFO"); setCurrentObject(net); if (net.isConnected()) { net.display (getMsg("cli_iattachMsg5",net.name),"ERROR"); return true; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt (getMsg("cli_iattachMsg6"), client.defaultNick); net.connect(pass); net.display (getMsg("cli_iattachMsg7",net.name), "INFO"); return true; } |
getTabForObject (client, true); | function cli_iclient (e){ if (!client.messages) client.display (getMsg("cli_iclientMsg"), "INFO"); setCurrentObject (client); return true;} |
|
client.currentObject.display ("Unknown command '" + e.command + "'.", "ERROR"); | var o = getObjectDetails(client.currentObject); if (o.server) { client.currentObject.display ("Unknown command ``" + e.command + "'', just guessing.", "WARNING"); o.server.sendData (e.command + " " + e.inputData + "\n"); } else client.currentObject.display ("Unknown command ``" + e.command + "''.", "ERROR"); | function cli_icommand (e){ var ary = client.commands.list (e.command); switch (ary.length) { case 0: client.currentObject.display ("Unknown command '" + e.command + "'.", "ERROR"); break; case 1: if (typeof client[ary[0].func] == "undefined") client.currentObject.display ("Sorry, '" + ary[0].name + "' has not been implemented.", "ERROR"); else { e.commandEntry = ary[0]; if (!client[ary[0].func](e)) client.currentObject.display (ary[0].name + " " + ary[0].usage, "USAGE"); } break; default: client.currentObject.display ("Ambiguous command: '" + e.command + "'", "ERROR"); var str = ""; for (var i in ary) str += str ? ", " + ary[i].name : ary[i].name; client.currentObject.display (ary.length + " commands match: " + str, "ERROR"); }} |
client.currentObject.display ("Sorry, '" + ary[0].name + "' has not been implemented.", | client.currentObject.display ("Sorry, ``" + ary[0].name + "'' has not been implemented.", | function cli_icommand (e){ var ary = client.commands.list (e.command); switch (ary.length) { case 0: client.currentObject.display ("Unknown command '" + e.command + "'.", "ERROR"); break; case 1: if (typeof client[ary[0].func] == "undefined") client.currentObject.display ("Sorry, '" + ary[0].name + "' has not been implemented.", "ERROR"); else { e.commandEntry = ary[0]; if (!client[ary[0].func](e)) client.currentObject.display (ary[0].name + " " + ary[0].usage, "USAGE"); } break; default: client.currentObject.display ("Ambiguous command: '" + e.command + "'", "ERROR"); var str = ""; for (var i in ary) str += str ? ", " + ary[i].name : ary[i].name; client.currentObject.display (ary.length + " commands match: " + str, "ERROR"); }} |
client.currentObject.display ("Ambiguous command: '" + e.command + "'", "ERROR"); | client.currentObject.display ("Ambiguous command: ``" + e.command + "''", "ERROR"); | function cli_icommand (e){ var ary = client.commands.list (e.command); switch (ary.length) { case 0: client.currentObject.display ("Unknown command '" + e.command + "'.", "ERROR"); break; case 1: if (typeof client[ary[0].func] == "undefined") client.currentObject.display ("Sorry, '" + ary[0].name + "' has not been implemented.", "ERROR"); else { e.commandEntry = ary[0]; if (!client[ary[0].func](e)) client.currentObject.display (ary[0].name + " " + ary[0].usage, "USAGE"); } break; default: client.currentObject.display ("Ambiguous command: '" + e.command + "'", "ERROR"); var str = ""; for (var i in ary) str += str ? ", " + ary[i].name : ary[i].name; client.currentObject.display (ary.length + " commands match: " + str, "ERROR"); }} |
if (o.server) | if ("server" in o) | function cli_icommand (e){ var ary = client.commands.list (e.command); if (ary.length == 0) { var o = getObjectDetails(client.currentObject); if (o.server) { client.currentObject.display (getMsg("cli_icommandMsg", e.command), "WARNING"); o.server.sendData (e.command + " " + e.inputData + "\n"); } else client.currentObject.display (getMsg("cli_icommandMsg2", e.command), "ERROR"); } else if (ary.length == 1 || ary[0].name == e.command) { if (typeof client[ary[0].func] == "undefined") client.currentObject.display (getMsg("cli_icommandMsg3", ary[0].name), "ERROR"); else { e.commandEntry = ary[0]; if (!client[ary[0].func](e)) client.currentObject.display (ary[0].name + " " + ary[0].usage, "USAGE"); } } else { client.currentObject.display (getMsg("cli_icommandMsg4", e.command), "ERROR"); var str = ""; for (var i in ary) str += str ? ", " + ary[i].name : ary[i].name; client.currentObject.display (getMsg("cli_icommandMsg5", [ary.length, str]), "ERROR"); }} |
switch (ary.length) | if (ary.length == 0) | function cli_icommand (e){ var ary = client.commands.list (e.command); switch (ary.length) { case 0: var o = getObjectDetails(client.currentObject); if (o.server) { client.currentObject.display (getMsg("cli_icommandMsg", e.command), "WARNING"); o.server.sendData (e.command + " " + e.inputData + "\n"); } else client.currentObject.display (getMsg("cli_icommandMsg2", e.command), "ERROR"); break; case 1: if (typeof client[ary[0].func] == "undefined") client.currentObject.display (getMsg("cli_icommandMsg3", ary[0].name), "ERROR"); else { e.commandEntry = ary[0]; if (!client[ary[0].func](e)) client.currentObject.display (ary[0].name + " " + ary[0].usage, "USAGE"); } break; default: client.currentObject.display (getMsg("cli_icommandMsg4", e.command), "ERROR"); var str = ""; for (var i in ary) str += str ? ", " + ary[i].name : ary[i].name; client.currentObject.display (getMsg("cli_icommandMsg5", [ary.length, str]), "ERROR"); }} |
case 0: var o = getObjectDetails(client.currentObject); if (o.server) { client.currentObject.display (getMsg("cli_icommandMsg", e.command), "WARNING"); o.server.sendData (e.command + " " + e.inputData + "\n"); } else client.currentObject.display (getMsg("cli_icommandMsg2", e.command), "ERROR"); break; case 1: if (typeof client[ary[0].func] == "undefined") client.currentObject.display (getMsg("cli_icommandMsg3", ary[0].name), "ERROR"); else { e.commandEntry = ary[0]; if (!client[ary[0].func](e)) client.currentObject.display (ary[0].name + " " + ary[0].usage, "USAGE"); } break; default: client.currentObject.display (getMsg("cli_icommandMsg4", | var o = getObjectDetails(client.currentObject); if (o.server) { client.currentObject.display (getMsg("cli_icommandMsg", e.command), "WARNING"); o.server.sendData (e.command + " " + e.inputData + "\n"); } else client.currentObject.display (getMsg("cli_icommandMsg2", | function cli_icommand (e){ var ary = client.commands.list (e.command); switch (ary.length) { case 0: var o = getObjectDetails(client.currentObject); if (o.server) { client.currentObject.display (getMsg("cli_icommandMsg", e.command), "WARNING"); o.server.sendData (e.command + " " + e.inputData + "\n"); } else client.currentObject.display (getMsg("cli_icommandMsg2", e.command), "ERROR"); break; case 1: if (typeof client[ary[0].func] == "undefined") client.currentObject.display (getMsg("cli_icommandMsg3", ary[0].name), "ERROR"); else { e.commandEntry = ary[0]; if (!client[ary[0].func](e)) client.currentObject.display (ary[0].name + " " + ary[0].usage, "USAGE"); } break; default: client.currentObject.display (getMsg("cli_icommandMsg4", e.command), "ERROR"); var str = ""; for (var i in ary) str += str ? ", " + ary[i].name : ary[i].name; client.currentObject.display (getMsg("cli_icommandMsg5", [ary.length, str]), "ERROR"); }} |
var str = ""; for (var i in ary) str += str ? ", " + ary[i].name : ary[i].name; client.currentObject.display (getMsg("cli_icommandMsg5", [ary.length, str]), "ERROR"); | } else if (ary.length == 1 || ary[0].name == e.command) { if (typeof client[ary[0].func] == "undefined") client.currentObject.display (getMsg("cli_icommandMsg3", ary[0].name), "ERROR"); else { e.commandEntry = ary[0]; if (!client[ary[0].func](e)) client.currentObject.display (ary[0].name + " " + ary[0].usage, "USAGE"); } } else { client.currentObject.display (getMsg("cli_icommandMsg4", e.command), "ERROR"); var str = ""; for (var i in ary) str += str ? ", " + ary[i].name : ary[i].name; client.currentObject.display (getMsg("cli_icommandMsg5", [ary.length, str]), "ERROR"); | function cli_icommand (e){ var ary = client.commands.list (e.command); switch (ary.length) { case 0: var o = getObjectDetails(client.currentObject); if (o.server) { client.currentObject.display (getMsg("cli_icommandMsg", e.command), "WARNING"); o.server.sendData (e.command + " " + e.inputData + "\n"); } else client.currentObject.display (getMsg("cli_icommandMsg2", e.command), "ERROR"); break; case 1: if (typeof client[ary[0].func] == "undefined") client.currentObject.display (getMsg("cli_icommandMsg3", ary[0].name), "ERROR"); else { e.commandEntry = ary[0]; if (!client[ary[0].func](e)) client.currentObject.display (ary[0].name + " " + ary[0].usage, "USAGE"); } break; default: client.currentObject.display (getMsg("cli_icommandMsg4", e.command), "ERROR"); var str = ""; for (var i in ary) str += str ? ", " + ary[i].name : ary[i].name; client.currentObject.display (getMsg("cli_icommandMsg5", [ary.length, str]), "ERROR"); }} |
.join(", ") + "].", "INFO"); | .join(", ") + "].\n" + "Type /help <command-name> for " + "information about a specific " + "command.", "INFO"); | function cli_icommands (e){ if (e && e.inputData) client.currentObject.display ("Currently implemented commands " + "matching the pattern ``" + e.inputData + "'' are [" + client.commands.listNames(e.inputData) .join(", ") + "].", "INFO"); else client.currentObject.display ("Currently implemented commands are [" + client.commands.listNames().join(", ") + "].", "INFO"); return true;} |
var matchResult = client.commands.listNames(pattern).join(", "); | var matchResult = client.commands.listNames(pattern).join(MSG_CSP); | function cli_icommands (e){ client.currentObject.display (getMsg("cli_icommandsMsg"), "INFO"); var pattern = (e && e.inputData) ? e.inputData : ""; var matchResult = client.commands.listNames(pattern).join(", "); if (pattern) client.currentObject.display (getMsg("cli_icommandsMsg2a", [pattern, matchResult]), "INFO"); else client.currentObject.display (getMsg("cli_icommandsMsg2b", matchResult), "INFO"); return true;} |
var ary = e.inputData.match(/^(\S+) (\S+)$/); | var ary = e.inputData.match(/^(\S+) (\S+)\s?(.*)$/); | function cli_ictcp (e){ if (!e.inputData) return false; if (!e.server) { client.currentObject.display (getMsg("cli_ictcpMsg"), "ERROR"); return false; } var ary = e.inputData.match(/^(\S+) (\S+)$/); if (ary == null) return false; e.server.ctcpTo (ary[1], ary[2]); return true; } |
e.server.ctcpTo (ary[1], ary[2]); | e.server.ctcpTo (ary[1], ary[2], ary[3]); | function cli_ictcp (e){ if (!e.inputData) return false; if (!e.server) { client.currentObject.display (getMsg("cli_ictcpMsg"), "ERROR"); return false; } var ary = e.inputData.match(/^(\S+) (\S+)$/); if (ary == null) return false; e.server.ctcpTo (ary[1], ary[2]); return true; } |
if (e.inputData) return false; | function cli_idelete (e){ onDeleteCurrentView(); return true;} |
|
if (e.inputData) | if ("inputData" in e && e.inputData) | function cli_idelete (e){ if (e.inputData) return false; onDeleteCurrentView(); return true;} |
client.currentObject.display ("User '" + e.inputData + "' not found.", | client.currentObject.display ("User ``" + e.inputData + "'' not found.", | function cli_ideop (e) { /* NOTE: See the next function for a well commented explanation of the general form of these Multiple-Target type functions */ if (!e.channel) { client.currentObject.display ("You must be on a channel to use " + "to use deop.", "ERROR"); return false; } if (!e.inputData) { var nicksAry = e.channel.getSelectedUsers(); if (nicksAry) { mapObjFunc(nicksAry, "setOp", false); return true; } else { return false; } } var cuser = e.channel.getUser(e.inputData); if (!cuser) { /* use e.inputData so the case is retained */ client.currentObject.display ("User '" + e.inputData + "' not found.", "ERROR"); return false; } cuser.setOp(false); return true;} |
client.currentObject.doEval = function (s) { return eval(s); } | client.currentObject.doEval = function (__s) { return eval(__s); } client.currentObject.display (e.inputData, "EVAL-IN"); | function cli_ieval (e){ if (!e.inputData) return false; if (e.inputData.indexOf ("\n") != -1) e.inputData = "\n" + e.inputData + "\n"; try { client.currentObject.doEval = function (s) { return eval(s); } rv = String(client.currentObject.doEval (e.inputData)); if (rv.indexOf ("\n") == -1) client.currentObject.display ("{" + e.inputData + "} " + rv, "EVAL"); else client.currentObject.display ("{" + e.inputData + "}\n" + rv, "EVAL"); } catch (ex) { client.currentObject.display (String(ex), "ERROR"); } return true; } |
if (rv.indexOf ("\n") == -1) client.currentObject.display ("{" + e.inputData + "} " + rv, "EVAL"); else client.currentObject.display ("{" + e.inputData + "}\n" + rv, "EVAL"); | client.currentObject.display (rv, "EVAL-OUT"); | function cli_ieval (e){ if (!e.inputData) return false; if (e.inputData.indexOf ("\n") != -1) e.inputData = "\n" + e.inputData + "\n"; try { client.currentObject.doEval = function (s) { return eval(s); } rv = String(client.currentObject.doEval (e.inputData)); if (rv.indexOf ("\n") == -1) client.currentObject.display ("{" + e.inputData + "} " + rv, "EVAL"); else client.currentObject.display ("{" + e.inputData + "}\n" + rv, "EVAL"); } catch (ex) { client.currentObject.display (String(ex), "ERROR"); } return true; } |
rv = String(client.currentObject.doEval (e.inputData)); | var rv = String(client.currentObject.doEval (e.inputData)); | function cli_ieval (e){ if (!e.inputData) return false; if (e.inputData.indexOf ("\n") != -1) e.inputData = "\n" + e.inputData + "\n"; try { client.currentObject.doEval = function (__s) { return eval(__s); } client.currentObject.display (e.inputData, "EVAL-IN"); rv = String(client.currentObject.doEval (e.inputData)); client.currentObject.display (rv, "EVAL-OUT"); } catch (ex) { client.currentObject.display (String(ex), "ERROR"); } return true; } |
client.currentObject.display ("No such command, '" + e.inputData + "'.", "ERROR"); | client.currentObject.display ("No such command, ``" + e.inputData + "''.", "ERROR"); | function cli_ihelp (e){ var ary = client.commands.list (e.inputData); if (ary.length == 0) { client.currentObject.display ("No such command, '" + e.inputData + "'.", "ERROR"); return false; } var saveDir = client.PRINT_DIRECTION; client.PRINT_DIRECTION = 1; for (var i in ary) { client.currentObject.display (ary[i].name + " " + ary[i].usage, "USAGE"); client.currentObject.display (ary[i].help, "HELP"); } client.PRINT_DIRECTION = saveDir; return true; } |
client.currentObject.display ("Network '" + e.network.name + " is not connected.", "ERROR"); | client.currentObject.display ("Network ``" + e.network.name + "'' is not connected.", "ERROR"); | function cli_ijoin (e){ if (!e.network || !e.network.isConnected()) { if (!e.network) client.currentObject.display ("No network selected.", "ERROR"); else client.currentObject.display ("Network '" + e.network.name + " is not connected.", "ERROR"); return false; } var ary = e.inputData.match(/(\S+) ?(\S+)?/); if (!ary) return false; var name = ary[1]; var key = (ary[2]) ? ary[2] : ""; if ((name[0] != "#") && (name[0] != "&") && (name[0] != "+")) name = "#" + name; e.channel = e.server.addChannel (name); e.channel.join(key); e.channel.display ("Joining...", "INFO"); setCurrentObject(e.channel); return true; } |
e.channel.display ("Joining...", "INFO"); | if (!e.channel.messages) e.channel.display ("Channel view for ``" + e.channel.name + "'' opened.", "INFO"); | function cli_ijoin (e){ if (!e.network || !e.network.isConnected()) { if (!e.network) client.currentObject.display ("No network selected.", "ERROR"); else client.currentObject.display ("Network '" + e.network.name + " is not connected.", "ERROR"); return false; } var ary = e.inputData.match(/(\S+) ?(\S+)?/); if (!ary) return false; var name = ary[1]; var key = (ary[2]) ? ary[2] : ""; if ((name[0] != "#") && (name[0] != "&") && (name[0] != "+")) name = "#" + name; e.channel = e.server.addChannel (name); e.channel.join(key); e.channel.display ("Joining...", "INFO"); setCurrentObject(e.channel); return true; } |
var ary = e.inputData.match(/(\S+) ?(\S+)?/); | var ary = e.inputData.match(/(((\S+), *)*(\S+)) *(\S+)?/); | function cli_ijoin (e){ if (!e.network || !e.network.isConnected()) { if (!e.network) client.currentObject.display (getMsg("cli_ijoinMsg"), "ERROR"); else client.currentObject.display (getMsg("cli_ijoinMsg2", e.network.name1), "ERROR"); return false; } var ary = e.inputData.match(/(\S+) ?(\S+)?/); var name; var key = ""; if (ary) { name = ary[1]; if (2 in ary) key = ary[2]; } else { if (client.currentObject.TYPE == "IRCChannel") name = client.currentObject.name; else return false; if (client.currentObject.mode.key) key = client.currentObject.mode.key } if ((name[0] != "#") && (name[0] != "&") && (name[0] != "+") && (name[0] != "!")) name = "#" + name; e.channel = e.server.addChannel (name); e.channel.join(key); if (!("messages" in e.channel)) e.channel.display (getMsg("cli_ijoinMsg3",e.channel.name), "INFO"); setCurrentObject(e.channel); return true; } |
var namelist; | function cli_ijoin (e){ if (!e.network || !e.network.isConnected()) { if (!e.network) client.currentObject.display (getMsg("cli_ijoinMsg"), "ERROR"); else client.currentObject.display (getMsg("cli_ijoinMsg2", e.network.name1), "ERROR"); return false; } var ary = e.inputData.match(/(\S+) ?(\S+)?/); var name; var key = ""; if (ary) { name = ary[1]; if (2 in ary) key = ary[2]; } else { if (client.currentObject.TYPE == "IRCChannel") name = client.currentObject.name; else return false; if (client.currentObject.mode.key) key = client.currentObject.mode.key } if ((name[0] != "#") && (name[0] != "&") && (name[0] != "+") && (name[0] != "!")) name = "#" + name; e.channel = e.server.addChannel (name); e.channel.join(key); if (!("messages" in e.channel)) e.channel.display (getMsg("cli_ijoinMsg3",e.channel.name), "INFO"); setCurrentObject(e.channel); return true; } |
|
name = ary[1]; if (2 in ary) key = ary[2]; | namelist = ary[1].split(/, */); if (5 in ary) key = ary[5]; | function cli_ijoin (e){ if (!e.network || !e.network.isConnected()) { if (!e.network) client.currentObject.display (getMsg("cli_ijoinMsg"), "ERROR"); else client.currentObject.display (getMsg("cli_ijoinMsg2", e.network.name1), "ERROR"); return false; } var ary = e.inputData.match(/(\S+) ?(\S+)?/); var name; var key = ""; if (ary) { name = ary[1]; if (2 in ary) key = ary[2]; } else { if (client.currentObject.TYPE == "IRCChannel") name = client.currentObject.name; else return false; if (client.currentObject.mode.key) key = client.currentObject.mode.key } if ((name[0] != "#") && (name[0] != "&") && (name[0] != "+") && (name[0] != "!")) name = "#" + name; e.channel = e.server.addChannel (name); e.channel.join(key); if (!("messages" in e.channel)) e.channel.display (getMsg("cli_ijoinMsg3",e.channel.name), "INFO"); setCurrentObject(e.channel); return true; } |
name = client.currentObject.name; | namelist = [client.currentObject.name]; | function cli_ijoin (e){ if (!e.network || !e.network.isConnected()) { if (!e.network) client.currentObject.display (getMsg("cli_ijoinMsg"), "ERROR"); else client.currentObject.display (getMsg("cli_ijoinMsg2", e.network.name1), "ERROR"); return false; } var ary = e.inputData.match(/(\S+) ?(\S+)?/); var name; var key = ""; if (ary) { name = ary[1]; if (2 in ary) key = ary[2]; } else { if (client.currentObject.TYPE == "IRCChannel") name = client.currentObject.name; else return false; if (client.currentObject.mode.key) key = client.currentObject.mode.key } if ((name[0] != "#") && (name[0] != "&") && (name[0] != "+") && (name[0] != "!")) name = "#" + name; e.channel = e.server.addChannel (name); e.channel.join(key); if (!("messages" in e.channel)) e.channel.display (getMsg("cli_ijoinMsg3",e.channel.name), "INFO"); setCurrentObject(e.channel); return true; } |
if ((name[0] != "#") && (name[0] != "&") && (name[0] != "+") && (name[0] != "!")) name = "#" + name; | function cli_ijoin (e){ if (!e.network || !e.network.isConnected()) { if (!e.network) client.currentObject.display (getMsg("cli_ijoinMsg"), "ERROR"); else client.currentObject.display (getMsg("cli_ijoinMsg2", e.network.name1), "ERROR"); return false; } var ary = e.inputData.match(/(\S+) ?(\S+)?/); var name; var key = ""; if (ary) { name = ary[1]; if (2 in ary) key = ary[2]; } else { if (client.currentObject.TYPE == "IRCChannel") name = client.currentObject.name; else return false; if (client.currentObject.mode.key) key = client.currentObject.mode.key } if ((name[0] != "#") && (name[0] != "&") && (name[0] != "+") && (name[0] != "!")) name = "#" + name; e.channel = e.server.addChannel (name); e.channel.join(key); if (!("messages" in e.channel)) e.channel.display (getMsg("cli_ijoinMsg3",e.channel.name), "INFO"); setCurrentObject(e.channel); return true; } |
|
e.channel = e.server.addChannel (name); e.channel.join(key); if (!("messages" in e.channel)) e.channel.display (getMsg("cli_ijoinMsg3",e.channel.name), "INFO"); setCurrentObject(e.channel); | for (i in namelist) { name = namelist[i]; if ((name[0] != "#") && (name[0] != "&") && (name[0] != "+") && (name[0] != "!")) name = "#" + name; e.channel = e.server.addChannel (name); e.channel.join(key); if (!("messages" in e.channel)) e.channel.display (getMsg("cli_ijoinMsg3",e.channel.name), "INFO"); setCurrentObject(e.channel); } | function cli_ijoin (e){ if (!e.network || !e.network.isConnected()) { if (!e.network) client.currentObject.display (getMsg("cli_ijoinMsg"), "ERROR"); else client.currentObject.display (getMsg("cli_ijoinMsg2", e.network.name1), "ERROR"); return false; } var ary = e.inputData.match(/(\S+) ?(\S+)?/); var name; var key = ""; if (ary) { name = ary[1]; if (2 in ary) key = ary[2]; } else { if (client.currentObject.TYPE == "IRCChannel") name = client.currentObject.name; else return false; if (client.currentObject.mode.key) key = client.currentObject.mode.key } if ((name[0] != "#") && (name[0] != "&") && (name[0] != "+") && (name[0] != "!")) name = "#" + name; e.channel = e.server.addChannel (name); e.channel.join(key); if (!("messages" in e.channel)) e.channel.display (getMsg("cli_ijoinMsg3",e.channel.name), "INFO"); setCurrentObject(e.channel); return true; } |
if (ary[2]) | if (2 in ary) | function cli_ijoin (e){ if (!e.network || !e.network.isConnected()) { if (!e.network) client.currentObject.display (getMsg("cli_ijoinMsg"), "ERROR"); else client.currentObject.display (getMsg("cli_ijoinMsg2", e.network.name1), "ERROR"); return false; } var ary = e.inputData.match(/(\S+) ?(\S+)?/); var name; var key = ""; if (ary) { name = ary[1]; if (ary[2]) key = ary[2]; } else { if (client.currentObject.TYPE == "IRCChannel") name = client.currentObject.name; else return false; if (client.currentObject.mode.key) key = client.currentObject.mode.key } if ((name[0] != "#") && (name[0] != "&") && (name[0] != "+") && (name[0] != "!")) name = "#" + name; e.channel = e.server.addChannel (name); e.channel.join(key); if (!e.channel.messages) e.channel.display (getMsg("cli_ijoinMsg3",e.channel.name), "INFO"); setCurrentObject(e.channel); return true; } |
if (!e.channel.messages) | if (!("messages" in e.channel)) | function cli_ijoin (e){ if (!e.network || !e.network.isConnected()) { if (!e.network) client.currentObject.display (getMsg("cli_ijoinMsg"), "ERROR"); else client.currentObject.display (getMsg("cli_ijoinMsg2", e.network.name1), "ERROR"); return false; } var ary = e.inputData.match(/(\S+) ?(\S+)?/); var name; var key = ""; if (ary) { name = ary[1]; if (ary[2]) key = ary[2]; } else { if (client.currentObject.TYPE == "IRCChannel") name = client.currentObject.name; else return false; if (client.currentObject.mode.key) key = client.currentObject.mode.key } if ((name[0] != "#") && (name[0] != "&") && (name[0] != "+") && (name[0] != "!")) name = "#" + name; e.channel = e.server.addChannel (name); e.channel.join(key); if (!e.channel.messages) e.channel.display (getMsg("cli_ijoinMsg3",e.channel.name), "INFO"); setCurrentObject(e.channel); return true; } |
client.currentObject.display ("User '" + e.inputData + "' not found.", | client.currentObject.display ("User ``" + e.inputData + "'' not found.", | function cli_ikick (e) { if (!e.channel) { client.currentObject.display ("You must be on a channel to use " + "kick.", "ERROR"); return false; } if (!e.inputData) { var nicksAry = e.channel.getSelectedUsers(); if (nicksAry) { mapObjFunc(nicksAry, "kick", ""); return true; } else { return false; } } var ary = e.inputData.match ( /(\S+)? ?(.*)/ ); var cuser = e.channel.getUser(ary[1]); if (!cuser) { client.currentObject.display ("User '" + e.inputData + "' not found.", "ERROR"); return false; } if (ary.length > 2) { cuser.kick(ary[2]); } else cuser.kick(); return true;} |
if (!e.channel) | if (typeof client.currentObject.act != "function") | function cli_ime (e){ if (!e.channel) { client.currentObject.display ("Me can only be used from channels.", "ERROR"); return false; } e.inputData = filterOutput (e.inputData, "ACTION", "!ME"); e.channel.act (e.inputData); return true;} |
client.currentObject.display ("Me can only be used from channels.", | client.currentObject.display ("Me cannot be used in this view.", | function cli_ime (e){ if (!e.channel) { client.currentObject.display ("Me can only be used from channels.", "ERROR"); return false; } e.inputData = filterOutput (e.inputData, "ACTION", "!ME"); e.channel.act (e.inputData); return true;} |
e.inputData = filterOutput (e.inputData, "ACTION", "!ME"); e.channel.act (e.inputData); | e.inputData = filterOutput (e.inputData, "ACTION", "ME!"); client.currentObject.display (e.inputData, "ACTION", "ME!", client.currentObject); client.currentObject.act (e.inputData); | function cli_ime (e){ if (!e.channel) { client.currentObject.display ("Me can only be used from channels.", "ERROR"); return false; } e.inputData = filterOutput (e.inputData, "ACTION", "!ME"); e.channel.act (e.inputData); return true;} |
if (!usr.messages) usr.display ("Chat with " + usr.nick + " opened.", "INFO"); setCurrentObject (usr); var msg = filterOutput(ary[2], "PRIVMSG", "!ME"); | var msg = filterOutput(ary[2], "PRIVMSG", "ME!"); client.currentObject.display (msg, "PRIVMSG", "ME!", usr); | function cli_imsg (e){ if (!e.network || !e.network.isConnected()) { client.currentObject.display ("You must be connected to a network " + "to use msg", "ERROR"); return false; } var ary = e.inputData.match (/(\S+)\s+(.*)/); if (ary == null) return false; var usr = e.network.primServ.addUser(ary[1].toLowerCase()); if (!usr.messages) usr.display ("Chat with " + usr.nick + " opened.", "INFO"); setCurrentObject (usr); var msg = filterOutput(ary[2], "PRIVMSG", "!ME"); usr.say (ary[2]); return true;} |
function cli_inames () | function cli_inames (e) | function cli_inames (){ onToggleVisibility ("info"); return true; } |
onToggleVisibility ("info"); | if (!e.network) { client.currentObject.display ("/names cannot be used from this " + "view.", "ERROR"); return false; } if (e.inputData) { if (!e.network.isConnected()) { client.currentObject.display ("Network ``" + e.network.name + "'' is not connected.", "ERROR"); return false; } chan = e.inputData; } else { if (client.currentObject.TYPE != "IRCChannel") { client.currentObject.display ("You must supply a channel name to " + "use /names from this view.", "ERROR"); return false; } chan = e.channel.name; } client.currentObject.pendingNamesReply = true; e.server.sendData ("NAMES " + chan + "\n"); | function cli_inames (){ onToggleVisibility ("info"); return true; } |
client.currentObject.display ("Unknown network '" + e.inputData + "'", | client.currentObject.display ("Unknown network ``" + e.inputData + "''", | function cli_inetwork (e){ if (!e.inputData) return false; var net = client.networks[e.inputData]; if (net) { client.lastNetwork = net; setCurrentObject (net); } else { client.currentObject.display ("Unknown network '" + e.inputData + "'", "ERROR"); return false; } return true; } |
client.lastNetwork = net; | function cli_inetwork (e){ if (!e.inputData) return false; var net = client.networks[e.inputData]; if (net) { client.lastNetwork = net; setCurrentObject (net); } else { client.currentObject.display (getMsg("cli_inetworkMsg",e.inputData), "ERROR"); return false; } return true; } |
|
e.server.sendData ('NICK ' + e.inputData + '\n'); | e.server.sendData ("NICK " + e.inputData + "\n"); | function cli_inick (e){ if (!e.inputData) return false; if (e.server) e.server.sendData ('NICK ' + e.inputData + '\n'); else CIRCNetwork.prototype.INITIAL_NICK = e.inputData; return true; } |
client.currentObject.display ("User '" + e.inputData + "' not found.", | client.currentObject.display ("User ``" + e.inputData + "'' not found.", | function cli_iop (e) { if (!e.channel) { client.currentObject.display ("You must be connected to a network " + "to use op.", "ERROR"); return false; } if (!e.inputData) { /* Since no param is passed, check for selection */ var nicksAry = e.channel.getSelectedUsers(); /* If a valid array of user objects, then call the mapObjFunc */ if (nicksAry) { /* See test3-utils.js: this simply applies the setOp function to every item in nicksAry with the parameter of "true" each time */ mapObjFunc(nicksAry, "setOp", true); return true; } else { /* If no input and no selection, return false to display the usage */ return false; } } /* We do have inputData, so use that, rather than any other option */ var cuser = e.channel.getUser(e.inputData); if (!cuser) { client.currentObject.display ("User '" + e.inputData + "' not found.", "ERROR"); return false; } cuser.setOp(true); return true; } |
var ary = e.inputData.match (/^\s*("([^"]*)"|([^\s]*))/); | var ary = e.inputData.match (/^\s*(\"([^\"]*)\"|([^\s]*))/); | function cli_irlist (e){ var o = getObjectDetails(client.currentObject); if (!("server" in o)) { client.currentObject.display (getMsg("onInputSimpleCommandMsg", "list"), "WARNING"); return false; } o.network.list = new Array(); var ary = e.inputData.match (/^\s*("([^"]*)"|([^\s]*))/); try { if (ary[2]) o.network.list.regexp = new RegExp(ary[2], "i"); else if (ary[3]) o.network.list.regexp = new RegExp(ary[3], "i"); else return false; } catch(error) { client.currentObject.display (getMsg("cli_irlistMsg", e.inputData, error), "ERROR"); return false; } o.server.sendData ("list\n"); return true;} |
onToggleVisibility ("status"); | onToggleVisibility ("header"); | function cli_isbar (){ onToggleVisibility ("status"); return true;} |
if (o.server) | if ("server" in o) | function cli_iscommand (e){ var o = getObjectDetails(client.currentObject); if (o.server) { o.server.sendData (e.command + " " + e.inputData + "\n"); return true; } else { client.currentObject.display (getMsg("onInputSimpleCommandMsg", e.command),"WARNING"); return false; }} |
client.networks[ary[1]] = new CIRCNetwork (ary[1], [{name: ary[1], port: ary[2]}], client.eventPump); | for (var n in client.networks) if (n == ary[1]) if (client.networks[n].isConnected()) { client.currentObject.display ("Already connected to " + ary[1], "ERROR"); return false; } else { net = client.networks[n]; break; } if (!net) client.networks[ary[1]] = new CIRCNetwork (ary[1], [{name: ary[1], port: ary[2]}], client.eventPump); else net.serverList = [{name: ary[1], port: ary[2]}]; | function cli_iserver (e){ if (!e.inputData) return false; var ary = e.inputData.match(/^([^\s\:]+)[\s\:]?(\d+)? ?(\S+)?/); var pass = (ary[2]) ? ary[2] : ""; if (ary == null) return false; if (!ary[2]) ary[2] = 6667; client.networks[ary[1]] = new CIRCNetwork (ary[1], [{name: ary[1], port: ary[2]}], client.eventPump); client.onInputAttach ({inputData: ary[1] + " " + pass}); return true;} |
var ary = e.inputData.match(/^([^\s\:]+)[\s\:]?(\d+)? ?(\S+)?/); var pass = (ary[2]) ? ary[2] : ""; | var ary = e.inputData.match(/^([^\s\:]+)[\s\:]?(?:(\d+)(?:\s+(\S+)|$)|(\S+)|$)/); var pass; if (3 in ary && ary[3]) pass = ary[3]; else if (4 in ary && ary[4]) pass = ary[4]; | function cli_iserver (e){ if (!e.inputData) return false; var ary = e.inputData.match(/^([^\s\:]+)[\s\:]?(\d+)? ?(\S+)?/); var pass = (ary[2]) ? ary[2] : ""; if (ary == null) return false; if (!ary[2]) ary[2] = 6667; var net = null; for (var n in client.networks) if (n == ary[1]) if (client.networks[n].isConnected()) { client.currentObject.display (getMsg("cli_iserverMsg",ary[1]), "ERROR"); return false; } else { net = client.networks[n]; break; } if (!net) client.networks[ary[1]] = new CIRCNetwork (ary[1], [{name: ary[1], port: ary[2]}], client.eventPump); else net.serverList = [{name: ary[1], port: ary[2]}]; client.onInputAttach ({inputData: ary[1] + " " + pass}); return true;} |
if (!ary[2]) ary[2] = 6667; | var port; if (2 in ary && ary[2]) port = ary[2]; else port = 6667; | function cli_iserver (e){ if (!e.inputData) return false; var ary = e.inputData.match(/^([^\s\:]+)[\s\:]?(\d+)? ?(\S+)?/); var pass = (ary[2]) ? ary[2] : ""; if (ary == null) return false; if (!ary[2]) ary[2] = 6667; var net = null; for (var n in client.networks) if (n == ary[1]) if (client.networks[n].isConnected()) { client.currentObject.display (getMsg("cli_iserverMsg",ary[1]), "ERROR"); return false; } else { net = client.networks[n]; break; } if (!net) client.networks[ary[1]] = new CIRCNetwork (ary[1], [{name: ary[1], port: ary[2]}], client.eventPump); else net.serverList = [{name: ary[1], port: ary[2]}]; client.onInputAttach ({inputData: ary[1] + " " + pass}); return true;} |
new CIRCNetwork (ary[1], [{name: ary[1], port: ary[2]}], | new CIRCNetwork (ary[1], [{name: ary[1], port: port, password: pass}], | function cli_iserver (e){ if (!e.inputData) return false; var ary = e.inputData.match(/^([^\s\:]+)[\s\:]?(\d+)? ?(\S+)?/); var pass = (ary[2]) ? ary[2] : ""; if (ary == null) return false; if (!ary[2]) ary[2] = 6667; var net = null; for (var n in client.networks) if (n == ary[1]) if (client.networks[n].isConnected()) { client.currentObject.display (getMsg("cli_iserverMsg",ary[1]), "ERROR"); return false; } else { net = client.networks[n]; break; } if (!net) client.networks[ary[1]] = new CIRCNetwork (ary[1], [{name: ary[1], port: ary[2]}], client.eventPump); else net.serverList = [{name: ary[1], port: ary[2]}]; client.onInputAttach ({inputData: ary[1] + " " + pass}); return true;} |
net.serverList = [{name: ary[1], port: ary[2]}]; client.onInputAttach ({inputData: ary[1] + " " + pass}); | { net.serverList = [{name: ary[1], port: port, password: pass}]; } client.connectToNetwork (ary[1]); | function cli_iserver (e){ if (!e.inputData) return false; var ary = e.inputData.match(/^([^\s\:]+)[\s\:]?(\d+)? ?(\S+)?/); var pass = (ary[2]) ? ary[2] : ""; if (ary == null) return false; if (!ary[2]) ary[2] = 6667; var net = null; for (var n in client.networks) if (n == ary[1]) if (client.networks[n].isConnected()) { client.currentObject.display (getMsg("cli_iserverMsg",ary[1]), "ERROR"); return false; } else { net = client.networks[n]; break; } if (!net) client.networks[ary[1]] = new CIRCNetwork (ary[1], [{name: ary[1], port: ary[2]}], client.eventPump); else net.serverList = [{name: ary[1], port: ary[2]}]; client.onInputAttach ({inputData: ary[1] + " " + pass}); return true;} |
(getMsg("cli_istalkMsg2", client.stalkingVictims.join(", ")), | (getMsg("cli_istalkMsg2", client.stalkingVictims.join(MSG_CSP)), | function cli_istalk (e){ if (!e.inputData) { if (client.stalkingVictims.length == 0) { client.currentObject.display(getMsg("cli_istalkMsg"), "STALK"); } else { client.currentObject.display (getMsg("cli_istalkMsg2", client.stalkingVictims.join(", ")), "STALK"); } return true; } client.stalkingVictims[client.stalkingVictims.length] = e.inputData; client.currentObject.display(getMsg("cli_istalkMsg3",e.inputData), "STALK"); return true;} |
if (e.channel.topic) { client.currentObject.display ("Topic: " + e.channel.topic, "TOPIC"); client.currentObject.display ("Set by " + e.channel.topicBy + " on " + e.channel.topicDate + ".", "TOPIC"); } else client.currentObject.display ("No topic.", "TOPIC"); | e.server.sendData ("TOPIC " + e.channel.name + "\n"); | function cli_itopic (e){ if (!e.channel) { client.currentObject.display ("Topic can only be used from channels.", "ERROR"); return false; } if (!e.inputData) { if (e.channel.topic) { client.currentObject.display ("Topic: " + e.channel.topic, "TOPIC"); client.currentObject.display ("Set by " + e.channel.topicBy + " on " + e.channel.topicDate + ".", "TOPIC"); } else client.currentObject.display ("No topic.", "TOPIC"); } else { if (!e.channel.setTopic(e.inputData)) client.currentObject.display ("Could not set topic.", "ERROR"); } return true; } |
client.currentObject.display ("User '" + e.inputData + "' not found.", | client.currentObject.display ("User ``" + e.inputData + "'' not found.", | function cli_ivoice (e) { if (!e.channel) { client.currentObject.display ("You must be on a channel " + "to use voice.", "ERROR"); return false; } if (!e.inputData) { var nicksAry = e.channel.getSelectedUsers(); if (nicksAry) { mapObjFunc(nicksAry, "setVoice", true); return true; } else { return false; } } var cuser = e.channel.getUser(e.inputData); if (!cuser) { client.currentObject.display ("User '" + e.inputData + "' not found.", "ERROR"); return false; } cuser.setVoice(true); return true;} |
client.currentObject.display ("User '" + e.inputData + "' not found.", | client.currentObject.display ("User ``" + e.inputData + "'' not found.", | function cli_izoom (e){ client.currentObject.display ("**WARNING** Zoom is busted at this time :(", "WARNING"); if (!e.inputData) return false; if (!e.channel) { client.currentObject.display ("Zoom can only be used from channels.", "ERROR"); return false; } var cuser = e.channel.getUser(e.inputData); if (!cuser) { client.currentObject.display ("User '" + e.inputData + "' not found.", "ERROR"); return false; } setCurrentObject(cuser); return true; } |
if (client.networks[n].primServ) client.networks[n].quit (reason); | if ("primServ" in client.networks[n]) client.networks[n].quit (reason); | function cli_quit (reason){ for (var n in client.networks) if (client.networks[n].primServ) client.networks[n].quit (reason); } |
if (!e.server) | if (!("server" in e)) | function cli_quit (e){ if (!e.server) { client.currentObject.display (getMsg("cli_quitMsg"), "ERROR"); return false; } if (!e.server.connection.isConnected) { client.currentObject.display (getMsg("cli_quitMsg2"), "ERROR"); return false; } e.server.logout (e.inputData); return true; } |
{ display(getMsg(MSG_ERR_NO_DEFAULT, client.currentObject.TYPE), MT_ERROR); } | display(MSG_ERR_NO_DEFAULT, MT_ERROR); | function cli_say(msg){ if ("say" in client.currentObject) { msg = filterOutput(msg, "PRIVMSG", client.currentObject); display(msg, "PRIVMSG", "ME!", client.currentObject); client.currentObject.say(msg); return; } switch (client.currentObject.TYPE) { case "IRCClient": dispatch("eval", {expression: msg}); break; default: if (msg != "") { display(getMsg(MSG_ERR_NO_DEFAULT, client.currentObject.TYPE), MT_ERROR); } break; }} |
display (msg, "PRIVMSG", "ME!", client.currentObject); client.currentObject.say(fromUnicode(msg)); | display(msg, "PRIVMSG", "ME!", client.currentObject); client.currentObject.say(msg); | function cli_say(msg){ switch (client.currentObject.TYPE) { case "IRCChannel": case "IRCUser": case "IRCChanUser": msg = filterOutput (msg, "PRIVMSG"); display (msg, "PRIVMSG", "ME!", client.currentObject); client.currentObject.say(fromUnicode(msg)); break; case "IRCClient": dispatch("eval", {expression: msg}); break; default: if (msg != "") { display(getMsg(MSG_ERR_NO_DEFAULT, client.currentObject.TYPE), MT_ERROR); } break; }} |
msg = filterOutput (msg, "PRIVMSG"); | msg = filterOutput(msg, "PRIVMSG", client.currentObject); | function cli_say(msg){ if ("say" in client.currentObject) { msg = filterOutput (msg, "PRIVMSG"); display(msg, "PRIVMSG", "ME!", client.currentObject); client.currentObject.say(msg); return; } switch (client.currentObject.TYPE) { case "IRCClient": dispatch("eval", {expression: msg}); break; default: if (msg != "") { display(getMsg(MSG_ERR_NO_DEFAULT, client.currentObject.TYPE), MT_ERROR); } break; }} |
client.display ("No default action for objects of type '" + client.currentObject.TYPE + "'", "ERROR"); | client.display ("No default action for objects of type ``" + client.currentObject.TYPE + "''", "ERROR"); | function cli_say(msg){ switch (client.currentObject.TYPE) { case "IRCChannel": case "IRCUser": case "IRCChanUser": msg = filterOutput (msg, "PRIVMSG"); client.currentObject.say (msg); break; case "IRCClient": client.onInputEval ({inputData: msg}); break; default: client.display ("No default action for objects of type '" + client.currentObject.TYPE + "'", "ERROR"); break; }} |
client.currentObject.display ("Hello World!", "HELLO"); client.currentObject.display ("Nothing is wrong.", "ERROR"); client.currentObject.display ("Use not, want not.", "USAGE"); client.currentObject.display ("Don't Panic", "HELP"); client.currentObject.display ("NOTICE this!", "NOTICE", "Mozilla"); client.currentObject.display ("And hear this.", "PRIVMSG", "Mozilla"); client.currentObject.display ("But dont do this?", "ACTION", "Mozilla"); client.currentObject.display ("or you'll get KICKed", "KICK", "Mozilla"); client.currentObject.display ("JOIN in the fun.", "JOIN", "Mozilla"); client.currentObject.display ("PART when you want.", "PART", "Mozilla"); client.currentObject.display ("But never QUIT", "QUIT", "Mozilla"); | if (o.server && o.server.me) { var me = o.server.me; var viewType = client.currentObject.TYPE; var sampleUser = {TYPE: "IRCUser", nick: "ircmonkey", name: "IRCMonkey", properNick: "IRCMonkey"}; var sampleChannel = {TYPE: "IRCChannel", name: "#mojo"}; | function cli_testdisplay (e){ client.currentObject.display ("Hello World!", "HELLO"); client.currentObject.display ("Nothing is wrong.", "ERROR"); client.currentObject.display ("Use not, want not.", "USAGE"); client.currentObject.display ("Don't Panic", "HELP"); client.currentObject.display ("NOTICE this!", "NOTICE", "Mozilla"); client.currentObject.display ("And hear this.", "PRIVMSG", "Mozilla"); client.currentObject.display ("But dont do this?", "ACTION", "Mozilla"); client.currentObject.display ("or you'll get KICKed", "KICK", "Mozilla"); client.currentObject.display ("JOIN in the fun.", "JOIN", "Mozilla"); client.currentObject.display ("PART when you want.", "PART", "Mozilla"); client.currentObject.display ("But never QUIT", "QUIT", "Mozilla"); if (client.currentObject.TYPE == "IRCChannel") { var mynick = e.server.me.nick; client.currentObject.display ("NOTICE this!", "NOTICE", "!ME"); client.currentObject.display ("And hear this.", "PRIVMSG", "!ME"); client.currentObject.display ("But dont do this?", "ACTION", "!ME"); client.currentObject.display ("or you'll get KICKed", "KICK", "!ME"); client.currentObject.display ("JOIN in the fun.", "JOIN", "!ME"); client.currentObject.display ("PART when you want.", "PART", "!ME"); client.currentObject.display ("But never QUIT", "QUIT", "!ME"); } return true; } |
if (client.currentObject.TYPE == "IRCChannel") { var mynick = e.server.me.nick; client.currentObject.display ("NOTICE this!", "NOTICE", "!ME"); client.currentObject.display ("And hear this.", "PRIVMSG", "!ME"); client.currentObject.display ("But dont do this?", "ACTION", "!ME"); client.currentObject.display ("or you'll get KICKed", "KICK", "!ME"); client.currentObject.display ("JOIN in the fun.", "JOIN", "!ME"); client.currentObject.display ("PART when you want.", "PART", "!ME"); client.currentObject.display ("But never QUIT", "QUIT", "!ME"); | function test (from, to, msg) { var fromText = (from != me) ? from.TYPE + " ``" + from.name + "''" : "you"; var toText = (to != me) ? to.TYPE + " ``" + to.name + "''" : "you"; client.currentObject.display ("Normal message from " + fromText + " to " + toText + ((msg) ? ": " + msg : ""), "PRIVMSG", from, to); client.currentObject.display ("Action message from " + fromText + " to " + toText + ((msg) ? ": " + msg : ""), "ACTION", from, to); client.currentObject.display ("Notice message from " + fromText + " to " + toText + ((msg) ? ": " + msg : ""), "NOTICE", from, to); } test (sampleUser, me); test (me, sampleUser); client.currentObject.display ("Sample URL <http: "message.", "PRIVMSG", sampleUser, me); client.currentObject.display ("Sample text styles *bold*, _underline_" + ", /italic/, |teletype|, #SmallCap# " + "message.", "PRIVMSG", sampleUser, me); client.currentObject.display ("Sample emoticon :) :( :~( :0 :/ :P " + ":| (* message.", "PRIVMSG", sampleUser, me); client.currentObject.display ("Sample Rheeeeeeeeeet! message.", "PRIVMSG", sampleUser, me); if (viewType == "IRCChannel") { test (sampleUser, sampleChannel); /* user to channel */ test (me, sampleChannel); /* me to channel */ client.currentObject.display ("Sample Topic message", "TOPIC", sampleUser, sampleChannel); client.currentObject.display ("Sample Join message", "JOIN", sampleUser, sampleChannel); client.currentObject.display ("Sample Part message", "PART", sampleUser, sampleChannel); client.currentObject.display ("Sample Kick message", "KICK", sampleUser, sampleChannel); client.currentObject.display ("Sample Quit message", "QUIT", sampleUser, sampleChannel); client.currentObject.display (me.nick + ": Sample /stalk match.", "PRIVMSG", sampleUser, sampleChannel); client.currentObject.display ("Sample text styles *bold*, " + "_underline_, /italic/, " + "|teletype|, #SmallCap# message.", "PRIVMSG", me, sampleChannel); } | function cli_testdisplay (e){ client.currentObject.display ("Hello World!", "HELLO"); client.currentObject.display ("Nothing is wrong.", "ERROR"); client.currentObject.display ("Use not, want not.", "USAGE"); client.currentObject.display ("Don't Panic", "HELP"); client.currentObject.display ("NOTICE this!", "NOTICE", "Mozilla"); client.currentObject.display ("And hear this.", "PRIVMSG", "Mozilla"); client.currentObject.display ("But dont do this?", "ACTION", "Mozilla"); client.currentObject.display ("or you'll get KICKed", "KICK", "Mozilla"); client.currentObject.display ("JOIN in the fun.", "JOIN", "Mozilla"); client.currentObject.display ("PART when you want.", "PART", "Mozilla"); client.currentObject.display ("But never QUIT", "QUIT", "Mozilla"); if (client.currentObject.TYPE == "IRCChannel") { var mynick = e.server.me.nick; client.currentObject.display ("NOTICE this!", "NOTICE", "!ME"); client.currentObject.display ("And hear this.", "PRIVMSG", "!ME"); client.currentObject.display ("But dont do this?", "ACTION", "!ME"); client.currentObject.display ("or you'll get KICKed", "KICK", "!ME"); client.currentObject.display ("JOIN in the fun.", "JOIN", "!ME"); client.currentObject.display ("PART when you want.", "PART", "!ME"); client.currentObject.display ("But never QUIT", "QUIT", "!ME"); } return true; } |
const buttons = ["!yes", "!no"]; | const buttons = [MSG_QUIT_ANYWAY, MSG_DONT_QUIT]; | function cli_wantToQuit(reason, deliberate){ var close = true; if (client.prefs["warnOnClose"] && !deliberate) { const buttons = ["!yes", "!no"]; var checkState = { value: true }; var rv = confirmEx(MSG_CONFIRM_QUIT, buttons, 0, MSG_WARN_ON_EXIT, checkState); close = (rv == 0); client.prefs["warnOnClose"] = checkState.value; } if (close) { client.userClose = true; display(MSG_CLOSING); client.quit(reason); }} |
dd ("Sending [" + nicksAry.length + "] nicks the whois call\n"); | function cli_whois (e) { if (!e.network || !e.network.isConnected()) { client.currentObject.display ("You must be connected to a network " + "to use whois", "ERROR"); return false; } if (!e.inputData) { var nicksAry = e.channel.getSelectedUsers(); if (nicksAry) { dd ("Sending [" + nicksAry.length + "] nicks the whois call\n"); mapObjFunc(nicksAry, "whois", null); return true; } else { return false; } } // Otherwise, there is no guarantee that the username // is currently a user var nick = e.inputData.match( /\S+/ ); e.server.whois (nick); return true;} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.