rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
dialog.urlInput.focus();
SetTextfieldFocus(dialog.urlInput);
function chooseFile(){ // Get a local file, converted into URL format fileName = editorShell.GetLocalFileURL(window, "img"); if (fileName && fileName != "") { dialog.urlInput.value = fileName; } // Put focus into the input field dialog.urlInput.focus();}
dialog.hrefInput.focus();
SetTextfieldFocus(dialog.hrefInput);
function chooseFile(){ // Get a local file, converted into URL format fileName = GetLocalFileURL("html"); if (fileName) { dialog.hrefInput.value = fileName; } // Put focus into the input field dialog.hrefInput.focus();}
aRootFolder = fp.file.path;
aRootFolder = fp.file.unicodePath;
function chooseProfileFolder( aRootFolder ){ if( !aRootFolder ) { try { var fp = Components.classes["component://mozilla/filepicker"].createInstance(Components.interfaces.nsIFilePicker); fp.init(window, bundle.GetStringFromName("chooseFolder"), Components.interfaces.nsIFilePicker.modeGetFolder); fp.setFilters(Components.interfaces.nsIFilePicker.filterAll); fp.show(); // later change to // aRootFolder = fp.file.unicodePath; aRootFolder = fp.file.path; } catch(e) { aRootFolder = null; } } if( aRootFolder ) { var folderText = document.getElementById("ProfileDir"); folderText.setAttribute( "rootFolder", aRootFolder ); if ( aRootFolder != top.profile.defaultProfileParentDir.nativePath ) document.getElementById( "useDefault" ).removeAttribute("disabled"); updateProfileName(); }}
function CIRCChannel (parent, name)
function CIRCChannel (parent, name, charset)
function CIRCChannel (parent, name){ var encodedName = fromUnicode(name + " "); /* bug 114923 */ encodedName = encodedName.substr(0,encodedName.length -1); var unicodeName = toUnicode(encodedName); name = encodedName.toLowerCase(); if (name in parent.channels) return parent.channels[name]; this.parent = parent; this.name = name; // used internally, lowercased this.unicodeName = unicodeName; // converted to unicode for display this.encodedName = encodedName; // encoded for communication with server this.users = new Object(); this.bans = new Object(); this.mode = new CIRCChanMode (this); this.usersStable = true; parent.channels[name] = this; return this; }
var encodedName = fromUnicode(name + " "); encodedName = encodedName.substr(0,encodedName.length -1); var unicodeName = toUnicode(encodedName); name = encodedName.toLowerCase();
function CIRCChannel (parent, name){ var encodedName = fromUnicode(name + " "); /* bug 114923 */ encodedName = encodedName.substr(0,encodedName.length -1); var unicodeName = toUnicode(encodedName); name = encodedName.toLowerCase(); if (name in parent.channels) return parent.channels[name]; this.parent = parent; this.name = name; // used internally, lowercased this.unicodeName = unicodeName; // converted to unicode for display this.encodedName = encodedName; // encoded for communication with server this.users = new Object(); this.bans = new Object(); this.mode = new CIRCChanMode (this); this.usersStable = true; parent.channels[name] = this; return this; }
this.charset = charset;
function CIRCChannel (parent, name){ var encodedName = fromUnicode(name + " "); /* bug 114923 */ encodedName = encodedName.substr(0,encodedName.length -1); var unicodeName = toUnicode(encodedName); name = encodedName.toLowerCase(); if (name in parent.channels) return parent.channels[name]; this.parent = parent; this.name = name; // used internally, lowercased this.unicodeName = unicodeName; // converted to unicode for display this.encodedName = encodedName; // encoded for communication with server this.users = new Object(); this.bans = new Object(); this.mode = new CIRCChanMode (this); this.usersStable = true; parent.channels[name] = this; return this; }
this.displayName = this.unicodeName;
function CIRCChannel (parent, encodedName, unicodeName){ this.normalizedName = parent.toLowerCase(encodedName); this.name = this.normalizedName; if (this.normalizedName in parent.channels) return parent.channels[this.normalizedName]; this.parent = parent; this.encodedName = encodedName; if (unicodeName) this.unicodeName = unicodeName; else this.unicodeName = toUnicode(encodedName, this); this.users = new Object(); this.bans = new Object(); this.mode = new CIRCChanMode (this); this.usersStable = true; /* These next two flags represent a subtle difference in state: * active - in the channel, from the server's point of view. * joined - in the channel, from the user's point of view. * e.g. parting the channel clears both, but being disconnected only * clears |active| - the user still wants to be in the channel, even * though they aren't physically able to until we've reconnected. */ this.active = false; this.joined = false; this.parent.channels[this.normalizedName] = this; if ("onInit" in this) this.onInit(); return this;}
name = name.toLowerCase();
var encodedName = fromUnicode(name + " "); encodedName = encodedName.substr(0,encodedName.length -1); var unicodeName = toUnicode(encodedName); name = encodedName.toLowerCase();
function CIRCChannel (parent, name){ name = name.toLowerCase(); if (name in parent.channels) return parent.channels[name]; this.parent = parent; this.name = name; this.users = new Object(); this.bans = new Object(); this.mode = new CIRCChanMode (this); this.usersStable = true; parent.channels[name] = this; return this; }
this.name = name;
this.name = name; this.unicodeName = unicodeName; this.encodedName = encodedName;
function CIRCChannel (parent, name){ name = name.toLowerCase(); if (name in parent.channels) return parent.channels[name]; this.parent = parent; this.name = name; this.users = new Object(); this.bans = new Object(); this.mode = new CIRCChanMode (this); this.usersStable = true; parent.channels[name] = this; return this; }
this.excepts = new Object();
function CIRCChannel(parent, unicodeName, encodedName){ // Both unicodeName and encodedName are optional, but at least one must be // present. if (!encodedName && !unicodeName) throw "Hey! Come on, I need either an encoded or a Unicode name."; if (!encodedName) encodedName = fromUnicode(unicodeName, parent); var canonicalName = parent.toLowerCase(encodedName); if (canonicalName in parent.channels) return parent.channels[canonicalName]; this.parent = parent; this.encodedName = encodedName; this.canonicalName = canonicalName; this.unicodeName = unicodeName || toUnicode(encodedName, this); this.viewName = this.unicodeName; this.users = new Object(); this.bans = new Object(); this.mode = new CIRCChanMode(this); this.usersStable = true; /* These next two flags represent a subtle difference in state: * active - in the channel, from the server's point of view. * joined - in the channel, from the user's point of view. * e.g. parting the channel clears both, but being disconnected only * clears |active| - the user still wants to be in the channel, even * though they aren't physically able to until we've reconnected. */ this.active = false; this.joined = false; this.parent.channels[this.canonicalName] = this; if ("onInit" in this) this.onInit(); return this;}
return this;
function CIRCChannel (parent, name){ name = name.toLowerCase(); var existingChannel = parent.channels[name]; if (typeof existingChannel == "object") return existingChannel; this.parent = parent; this.name = name; this.users = new Object(); this.bans = new Object(); this.mode = new CIRCChanMode (this); parent.channels[name] = this;}
return this;
function CIRCChanUser (parent, nick, isOp, isVoice){ var properNick = nick; nick = nick.toLowerCase(); var existingUser = parent.users[nick]; if (typeof existingUser != "undefined") { if (typeof isOp != "undefined") existingUser.isOp = isOp; if (typeof isVoice != "undefined") existingUser.isVoice = isVoice; return existingUser; } protoUser = new CIRCUser (parent.parent, properNick); this.__proto__ = protoUser; this.setOp = cusr_setop; this.setVoice = cusr_setvoice; this.setBan = cusr_setban; this.kick = cusr_kick; this.kickBan = cusr_kban; this.say = cusr_say; this.notice = cusr_notice; this.act = cusr_act; this.whois = cusr_whois; this.parent = parent; this.isOp = (typeof isOp != "undefined") ? isOp : false; this.isVoice = (typeof isVoice != "undefined") ? isVoice : false; this.TYPE = "IRCChanUser"; parent.users[nick] = this;}
this.displayName = name;
function CIRCNetwork (name, serverList, eventPump){ this.name = name; this.servers = new Object(); this.serverList = new Array(); this.ignoreList = new Object(); this.ignoreMaskCache = new Object(); this.connecting = false; for (var i = 0; i < serverList.length; ++i) { var server = serverList[i]; var password = ("password" in server) ? server.password : null; this.serverList.push(new CIRCServer(this, server.name, server.port, password)); } this.eventPump = eventPump; if ("onInit" in this) this.onInit();}
if (typeof connection.startAsyncRead == "function")
if (jsenv.HAS_NSPR_EVENTQ)
function CIRCServer (parent, connection){ var serverName = connection.host + ":" + connection.port; var s = parent.servers[serverName]; if (!s) { s = this; s.channels = new Object(); s.users = new Object(); } s.parent = parent; s.connection = connection; s.sendQueue = new Array(); s.lastSend = new Date("1/1/1980"); s.sendsThisRound = 0; s.savedLine = ""; s.lag = -1; s.usersStable = true; if (typeof connection.startAsyncRead == "function") connection.startAsyncRead(s); else s.parent.eventPump.addEvent(new CEvent ("server", "poll", s, "onPoll")); parent.servers[serverName] = s; return s; }
this.displayName = properNick;
function CIRCUser (parent, nick, name, host){ var properNick = nick; nick = parent.toLowerCase(nick); if (nick in parent.users) { var existingUser = parent.users[nick]; if (name) existingUser.name = name; if (host) existingUser.host = host; return existingUser; } this.parent = parent; this.nick = nick; this.properNick = properNick; this.name = name; this.host = host; this.connectionHost = null; this.modestr = this.parent.parent.INITIAL_UMODE; parent.users[nick] = this; if ("onInit" in this) this.onInit(); return this;}
return this;
function CIRCUser (parent, nick, name, host){ var properNick = nick; nick = nick.toLowerCase(); var existingUser = parent.users[nick]; if (typeof existingUser == "object") { if (name) existingUser.name = name; if (host) existingUser.host = host; return existingUser; } this.parent = parent; this.nick = nick; this.properNick = properNick; this.name = name; this.host = host; parent.users[nick] = this;}
else aPaletteItem.firstChild.removeAttribute("disabled");
else { aPaletteItem.firstChild.removeAttribute("busy"); }
function cleanUpItemForAdding(aPaletteItem){ aPaletteItem.removeAttribute("observes"); aPaletteItem.removeAttribute("disabled"); aPaletteItem.removeAttribute("type"); if (aPaletteItem.localName == "toolbaritem" && aPaletteItem.firstChild) { aPaletteItem.firstChild.removeAttribute("observes"); if (aPaletteItem.firstChild.localName == "textbox") aPaletteItem.firstChild.setAttribute("disabled", "true"); else aPaletteItem.firstChild.removeAttribute("disabled"); }}
FeedCache.removeFeed(feed.url);
FeedCache.removeFeed(aFeed.url);
cleanupParsingState: function(aFeed) { // now that we are done parsing the feed, remove the feed from our feed cache FeedCache.removeFeed(feed.url); aFeed.removeInvalidItems(); // let's be sure to flush any feed item changes back to disk var ds = getItemsDS(feed.server); ds.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).Flush(); // flush any changes if (aFeed.downloadCallback) aFeed.downloadCallback.downloaded(feed, kNewsBlogSuccess); this.request = null; // force the xml http request to go away. This helps reduce some nasty assertions on shut down. this.itemsToStore = ""; this.itemsToStoreIndex = 0; this.storeItemsTimer = null; },
var ds = getItemsDS(feed.server);
var ds = getItemsDS(aFeed.server);
cleanupParsingState: function(aFeed) { // now that we are done parsing the feed, remove the feed from our feed cache FeedCache.removeFeed(feed.url); aFeed.removeInvalidItems(); // let's be sure to flush any feed item changes back to disk var ds = getItemsDS(feed.server); ds.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).Flush(); // flush any changes if (aFeed.downloadCallback) aFeed.downloadCallback.downloaded(feed, kNewsBlogSuccess); this.request = null; // force the xml http request to go away. This helps reduce some nasty assertions on shut down. this.itemsToStore = ""; this.itemsToStoreIndex = 0; this.storeItemsTimer = null; },
aFeed.downloadCallback.downloaded(feed, kNewsBlogSuccess);
aFeed.downloadCallback.downloaded(aFeed, kNewsBlogSuccess);
cleanupParsingState: function(aFeed) { // now that we are done parsing the feed, remove the feed from our feed cache FeedCache.removeFeed(feed.url); aFeed.removeInvalidItems(); // let's be sure to flush any feed item changes back to disk var ds = getItemsDS(feed.server); ds.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).Flush(); // flush any changes if (aFeed.downloadCallback) aFeed.downloadCallback.downloaded(feed, kNewsBlogSuccess); this.request = null; // force the xml http request to go away. This helps reduce some nasty assertions on shut down. this.itemsToStore = ""; this.itemsToStoreIndex = 0; this.storeItemsTimer = null; },
getValueArrayFor(serverId)[pageId] = null;
accountArray[serverId] = null;
function clearAccountData(serverId, pageId){ getValueArrayFor(serverId)[pageId] = null;}
while (list.childNodes.length) list.removeChild(list.firstChild);
while (list.hasChildNodes()) list.removeChild(list.lastChild);
function ClearAttachmentList() { // clear selection var list = document.getElementById('attachmentList'); while (list.childNodes.length) list.removeChild(list.firstChild);}
display (getMsg(MSN_ERR_BP_NODICE, [fileName, line]), MT_ERROR);
function clearBreakpoint (fileName, line){ for (var b in console._breakpoints) if (console._breakpoints[b].fileName == fileName && console._breakpoints[b].line == line) return clearBreakpointByNumber (Number(b)); return 0;}
var fileName = bp.fileName; var line = bp.line; display (getMsg(MSN_BP_DISABLED, [fileName, line, matches])); if (console._sources[fileName]) delete console._sources[fileName][line - 1].isBreakpoint; else { function cb (data, url) { delete console._sources[fileName][line - 1].isBreakpoint; } loadSource(fileName, cb); }
function clearBreakpointByNumber (number){ var bp = console._breakpoints[number]; if (!bp) return 0; var matches = bp.length; for (var i = 0; i < bp.length; ++i) bp[i].script.clearBreakpoint(bp[i].pc); arrayRemoveAt (console._breakpoints, number); return matches;}
if (sourceRecord.isLoaded && sourceRecord.sourceText[line - 1])
if (sourceRecord.sourceText.isLoaded && sourceRecord.sourceText.sourceText[line - 1])
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.isLoaded && sourceRecord.sourceText[line - 1]) { delete sourceRecord.sourceText[line - 1].bpRecord; if (console.sourceView.childData.fileName == fileName) console.sourceView.outliner.invalidateRow (line - 1); } console.breakpoints.removeChildAtIndex(number); return bpr.scriptMatches;}
delete sourceRecord.sourceText[line - 1].bpRecord;
delete sourceRecord.sourceText.sourceText[line - 1].bpRecord;
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.isLoaded && sourceRecord.sourceText[line - 1]) { delete sourceRecord.sourceText[line - 1].bpRecord; if (console.sourceView.childData.fileName == fileName) console.sourceView.outliner.invalidateRow (line - 1); } console.breakpoints.removeChildAtIndex(number); return bpr.scriptMatches;}
cvSetVisible(data.cvWorkCountry, false);
function ClearCardViewPane(){ // FIX ME - waiting for bug fix...cvSetVisible(data.CardViewBox, false); // HACK - we need to be able to set the entire box or div to display:none when bug fixed var data = top.cvData; // title cvSetVisible(data.CardTitle, false); // Name section cvSetVisible(data.cvhName, false); cvSetVisible(data.cvNickname, false); cvSetVisible(data.cvEmail1, false); cvSetVisible(data.cvEmail2, false); // Home section cvSetVisible(data.cvhHome, false); cvSetVisible(data.cvHomeAddress, false); cvSetVisible(data.cvHomeCityStZip, false); // Other section cvSetVisible(data.cvhOther, false); cvSetVisible(data.cvNotes, false); // Phone section cvSetVisible(data.cvhPhone, false); cvSetVisible(data.cvPhWork, false); cvSetVisible(data.cvPhHome, false); cvSetVisible(data.cvPhFax, false); cvSetVisible(data.cvPhCellular, false); cvSetVisible(data.cvPhPager, false); // Work section cvSetVisible(data.cvhWork, false); cvSetVisible(data.cvJobTitle, false); cvSetVisible(data.cvDepartment, false); cvSetVisible(data.cvCompany, false); cvSetVisible(data.cvWorkAddress, false); cvSetVisible(data.cvWorkCityStZip, false);}
while (aEl.childNodes.length)
while (aEl.hasChildNodes())
clearChildren: function(aEl) { while (aEl.childNodes.length) aEl.removeChild(aEl.lastChild); },
var kids = aEl.childNodes; for (var i = kids.length-1; i >=0; --i) aEl.removeChild(kids[i]);
while (aEl.hasChildNodes()) aEl.removeChild(aEl.lastChild);
clearChildren: function(aEl) { var kids = aEl.childNodes; for (var i = kids.length-1; i >=0; --i) aEl.removeChild(kids[i]); },
throw BadMojo (ERR_NO_STACK);
throw new BadMojo (ERR_NO_STACK);
function clearCurrentFrame (){ if (!console.frames) throw BadMojo (ERR_NO_STACK); delete console._currentFrameIndex;}
delete console._pp_stopLine;
function clearCurrentFrame (){ if (!console.frames) throw new BadMojo (ERR_NO_STACK); delete console.stopLine; delete console.stopFile; delete console._currentFrameIndex; console.onFrameChanged (null, 0);}
function ClearEmailFieldWithButton(parentDiv)
function ClearEmailFieldWithButton(parentDiv, headerName)
function ClearEmailFieldWithButton(parentDiv){ if (parentDiv) { // the toggle button is the last child in the child nodes.. // we should never remove it... while (parentDiv.childNodes.length > 1) parentDiv.removeChild(parentDiv.childNodes[0]); }}
var delIndex = 1; if (headerName == "to") { if (numOfEmailsInToField < gNumOfEmailsToShowToggleButtonInFront) delIndex = 0; } else if (headerName == "cc") { if (numOfEmailsInCcField < gNumOfEmailsToShowToggleButtonInFront) delIndex = 0; } else { if (numOfEmailsInFromField < gNumOfEmailsToShowToggleButtonInFront) delIndex = 0; }
function ClearEmailFieldWithButton(parentDiv){ if (parentDiv) { // the toggle button is the last child in the child nodes.. // we should never remove it... while (parentDiv.childNodes.length > 1) parentDiv.removeChild(parentDiv.childNodes[0]); }}
parentDiv.removeChild(parentDiv.childNodes[0]);
parentDiv.removeChild(parentDiv.childNodes[delIndex]);
function ClearEmailFieldWithButton(parentDiv){ if (parentDiv) { // the toggle button is the last child in the child nodes.. // we should never remove it... while (parentDiv.childNodes.length > 1) parentDiv.removeChild(parentDiv.childNodes[0]); }}
for (var i = popup.childNodes.length - 1; i >= 0; i--) popup.removeChild(popup.childNodes[i]);
while (popup.hasChildNodes()) popup.removeChild(popup.lastChild);
function ClearIdentityListPopup(popup){ if (popup) for (var i = popup.childNodes.length - 1; i >= 0; i--) popup.removeChild(popup.childNodes[i]);}
list.selectedIndex = -1; for( i = (list.length-1); i >= 0; i-- ) { list.remove(i);
if (list) { list.selectedIndex = -1; for( i=list.length-1; i >= 0; i--) list.remove(i);
function ClearList(list){ list.selectedIndex = -1; for( i = (list.length-1); i >= 0; i-- ) { list.remove(i); }}
gLogView.setAttribute("src", gFilterList.logURL);
gLogView.reload();
function clearLog(){ gFilterList.clearLog(); // reload the newly truncated file gLogView.setAttribute("src", gFilterList.logURL);}
gLogView.setAttribute("src", gSpamSettings.logURL);
gLogView.reload();
function clearLog(){ gSpamSettings.clearLog(); // reload the newly truncated file gLogView.setAttribute("src", gSpamSettings.logURL);}
if (menulist) menulist.removeAllItems();
if (menulist) { menulist.selectedItem = null; var popup = menulist.firstChild; if (popup) while (popup.firstChild) popup.removeChild(popup.firstChild); }
function ClearMenulist(menulist){ if (menulist) menulist.removeAllItems();}
if (GetMessagePaneFrame().currentURI != "about:blank") GetMessagePaneFrame().loadURI("about:blank");
if (GetMessagePaneFrame().location != "about:blank") GetMessagePaneFrame().location = "about:blank";
function ClearMessagePane(){ if(gHaveLoadedMessage) { gHaveLoadedMessage = false; gCurrentDisplayedMessage = null; if (GetMessagePaneFrame().currentURI != "about:blank") GetMessagePaneFrame().loadURI("about:blank"); // hide the message header view AND the message pane... HideMessageHeaderPane(); }}
if (window.frames["messagepane"].location != "about:blank") window.frames["messagepane"].location = "about:blank";
if (GetMessagePaneFrame().currentURI != "about:blank") GetMessagePaneFrame().loadURI("about:blank");
function ClearMessagePane(){ if(gHaveLoadedMessage) { gHaveLoadedMessage = false; gCurrentDisplayedMessage = null; if (window.frames["messagepane"].location != "about:blank") window.frames["messagepane"].location = "about:blank"; // hide the message header view AND the message pane... HideMessageHeaderPane(); }}
messenger.OpenURL("about:blank");
if (window.frames["messagepane"].location != "about:blank") window.frames["messagepane"].location = "about:blank"
function ClearMessagePane(){ messenger.OpenURL("about:blank"); }
window.frames["messagepane"].location = "about:blank"
window.frames["messagepane"].location = "about:blank"; HideMessageHeaderPane();
function ClearMessagePane(){ if (window.frames["messagepane"].location != "about:blank") window.frames["messagepane"].location = "about:blank"}
if (gDBView) setTitleFromFolder(gDBView.msgFolder,null); else setTitleFromFolder(null,null);
clearMsgPane: function() { ClearMessagePane(); }
viewDebug("clearing QS as Necessary\n");
function ClearQSIfNecessary(){ GetSearchInput(); if (gSearchInput.value == "") return; viewDebug("clearing QS as Necessary\n"); Search("");}
dump("clearing QS as Necessary\n");
viewDebug("clearing QS as Necessary\n");
function ClearQSIfNecessary(){ GetSearchInput(); if (gSearchInput.value == "") return; dump("clearing QS as Necessary\n"); Search("");}
dump('before clearItemSelection\n');
function ClearThreadTreeSelection(){ var tree = GetThreadTree(); if(tree) { dump('before clearItemSelection\n'); tree.clearItemSelection(); }}
tree.setAttribute("length", 0); }
function ClearTreelist(tree){ if (tree) while (tree.firstChild) tree.removeChild(tree.firstChild);}
if (!iid.equals(nsICmdLineHandler) && !iid.equals(nsISupports)) throw Components.results.NS_ERROR_INVALID_ARG; return new CLineService();
return new CLineService().QueryInterface(iid);
function clf_create (outer, iid) { if (outer != null) throw Components.results.NS_ERROR_NO_AGGREGATION; if (!iid.equals(nsICmdLineHandler) && !iid.equals(nsISupports)) throw Components.results.NS_ERROR_INVALID_ARG; return new CLineService();}
client.currentObject.display ("You must be on a channel " + "to use devoice.", "ERROR");
client.currentObject.display (getMsg("cli_devoiceMsg"), "ERROR");
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;}
client.currentObject.display ("User ``" + e.inputData + "'' not found.",
client.currentObject.display (getMsg("cli_devoiceMsg2", e.inputData),
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;}
client.quit(e.inputData);
client.quit(fromUnicode(e.inputData));
function cli_exit (e){ client.quit(e.inputData); window.close(); return true;}
client.currentObject.display ("No network specified network, " + "Using ``" + client.lastNetwork.name + "''", "NOTICE");
client.currentObject.display (getMsg("cli_iattachMsg", 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 (!net.messages) net.displayHere ("Network view for ``" + net.name + "'' opened.", "INFO"); setCurrentObject(net); if (net.isConnected()) { net.display ("You are already connected to ``" + net.name + "''.", "ERROR"); return true; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt ("Please select a nickname", client.defaultNick); net.connect(pass); net.display ("Attempting to connect to ``" + net.name + "''. Use /cancel to abort.", "INFO"); return true; }
client.currentObject.display ("No network specified, and no " + "default network is in place.",
client.currentObject.display (getMsg("cli_iattachMsg2"),
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 (!net.messages) net.displayHere ("Network view for ``" + net.name + "'' opened.", "INFO"); setCurrentObject(net); if (net.isConnected()) { net.display ("You are already connected to ``" + net.name + "''.", "ERROR"); return true; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt ("Please select a nickname", client.defaultNick); net.connect(pass); net.display ("Attempting to connect to ``" + net.name + "''. Use /cancel to abort.", "INFO"); return true; }
client.currentObject.display ("Unknown network ``" + e.inputData + "''", "ERROR");
client.currentObject.display (getMsg("cli_iattachMsg3",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 (!net.messages) net.displayHere ("Network view for ``" + net.name + "'' opened.", "INFO"); setCurrentObject(net); if (net.isConnected()) { net.display ("You are already connected to ``" + net.name + "''.", "ERROR"); return true; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt ("Please select a nickname", client.defaultNick); net.connect(pass); net.display ("Attempting to connect to ``" + net.name + "''. Use /cancel to abort.", "INFO"); return true; }
net.displayHere ("Network view for ``" + net.name + "'' opened.", "INFO");
net.displayHere (getMsg("cli_iattachMsg4",net.name),"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 (!net.messages) net.displayHere ("Network view for ``" + net.name + "'' opened.", "INFO"); setCurrentObject(net); if (net.isConnected()) { net.display ("You are already connected to ``" + net.name + "''.", "ERROR"); return true; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt ("Please select a nickname", client.defaultNick); net.connect(pass); net.display ("Attempting to connect to ``" + net.name + "''. Use /cancel to abort.", "INFO"); return true; }
net.display ("You are already connected to ``" + net.name + "''.", "ERROR");
net.display (getMsg("cli_iattachMsg5",net.name),"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 (!net.messages) net.displayHere ("Network view for ``" + net.name + "'' opened.", "INFO"); setCurrentObject(net); if (net.isConnected()) { net.display ("You are already connected to ``" + net.name + "''.", "ERROR"); return true; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt ("Please select a nickname", client.defaultNick); net.connect(pass); net.display ("Attempting to connect to ``" + net.name + "''. Use /cancel to abort.", "INFO"); return true; }
prompt ("Please select a nickname", client.defaultNick);
prompt (getMsg("cli_iattachMsg6"), client.defaultNick);
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 (!net.messages) net.displayHere ("Network view for ``" + net.name + "'' opened.", "INFO"); setCurrentObject(net); if (net.isConnected()) { net.display ("You are already connected to ``" + net.name + "''.", "ERROR"); return true; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt ("Please select a nickname", client.defaultNick); net.connect(pass); net.display ("Attempting to connect to ``" + net.name + "''. Use /cancel to abort.", "INFO"); return true; }
net.display ("Attempting to connect to ``" + net.name + "''. Use /cancel to abort.", "INFO");
net.display (getMsg("cli_iattachMsg7",net.name), "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 (!net.messages) net.displayHere ("Network view for ``" + net.name + "'' opened.", "INFO"); setCurrentObject(net); if (net.isConnected()) { net.display ("You are already connected to ``" + net.name + "''.", "ERROR"); return true; } if (CIRCNetwork.prototype.INITIAL_NICK == client.defaultNick) CIRCNetwork.prototype.INITIAL_NICK = prompt ("Please select a nickname", client.defaultNick); net.connect(pass); net.display ("Attempting to connect to ``" + net.name + "''. Use /cancel to abort.", "INFO"); return true; }
e.server.sendData ("AWAY :" + e.inputData + "\n");
e.server.sendData ("AWAY :" + fromUnicode(e.inputData) + "\n");
function cli_iaway (e){ if (!e.network || !e.network.isConnected()) { client.currentObject.display (getMsg("cli_iawayMsg"), "ERROR"); return false; } else if (!e.inputData) { e.server.sendData ("AWAY\n"); } else { e.server.sendData ("AWAY :" + e.inputData + "\n"); } return true;}
client.currentObject.display ("You must be connected to a network " + "to use away.", "ERROR");
client.currentObject.display (getMsg("cli_iawayMsg"), "ERROR");
function cli_iaway (e){ if (!e.network || !e.network.isConnected()) { client.currentObject.display ("You must be connected to a network " + "to use away.", "ERROR"); return false; } else if (!e.inputData) { e.server.sendData ("AWAY\n"); } else { e.server.sendData ("AWAY " + e.inputData + "\n"); } return true;}
client.currentObject.display ("/cancel cannot be used from this view.", "ERROR");
client.currentObject.display (getMsg("cli_icancelMsg"), "ERROR");
function cli_icancel (e){ if (client.currentObject.TYPE != "IRCNetwork") { client.currentObject.display ("/cancel cannot be used from this view.", "ERROR"); return false; } if (!client.currentObject.connecting) { client.currentObject.display ("No connection in progress, nothing to " + "cancel.", "ERROR"); return false; } client.currentObject.connectAttempt = client.currentObject.MAX_CONNECT_ATTEMPTS + 1; client.currentObject.display ("Cancelling connection to ``" + client.currentObject.name + "''...", "INFO"); return true;}
client.currentObject.display ("No connection in progress, nothing to " + "cancel.", "ERROR");
client.currentObject.display (getMsg("cli_icancelMsg2"), "ERROR");
function cli_icancel (e){ if (client.currentObject.TYPE != "IRCNetwork") { client.currentObject.display ("/cancel cannot be used from this view.", "ERROR"); return false; } if (!client.currentObject.connecting) { client.currentObject.display ("No connection in progress, nothing to " + "cancel.", "ERROR"); return false; } client.currentObject.connectAttempt = client.currentObject.MAX_CONNECT_ATTEMPTS + 1; client.currentObject.display ("Cancelling connection to ``" + client.currentObject.name + "''...", "INFO"); return true;}
client.currentObject.display ("Cancelling connection to ``" + client.currentObject.name + "''...", "INFO");
client.currentObject.display (getMsg("cli_icancelMsg3", client.currentObject.name), "INFO");
function cli_icancel (e){ if (client.currentObject.TYPE != "IRCNetwork") { client.currentObject.display ("/cancel cannot be used from this view.", "ERROR"); return false; } if (!client.currentObject.connecting) { client.currentObject.display ("No connection in progress, nothing to " + "cancel.", "ERROR"); return false; } client.currentObject.connectAttempt = client.currentObject.MAX_CONNECT_ATTEMPTS + 1; client.currentObject.display ("Cancelling connection to ``" + client.currentObject.name + "''...", "INFO"); return true;}
client.display ("JavaScript console for ``*client*'' opened.", "INFO");
client.display (getMsg("cli_iclientMsg"), "INFO");
function cli_iclient (e){ if (!client.messages) client.display ("JavaScript console for ``*client*'' opened.", "INFO"); setCurrentObject (client); return true;}
client.currentObject.display ("Unknown command ``" + e.command + "'', just guessing.", "WARNING");
client.currentObject.display (getMsg("cli_icommandMsg", e.command), "WARNING");
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 ("Unknown command ``" + e.command + "'', just guessing.", "WARNING"); o.server.sendData (e.command + " " + e.inputData + "\n"); } else 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 ("Unknown command ``" + e.command + "''.", "ERROR");
client.currentObject.display (getMsg("cli_icommandMsg2", e.command), "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 ("Unknown command ``" + e.command + "'', just guessing.", "WARNING"); o.server.sendData (e.command + " " + e.inputData + "\n"); } else 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.", "ERROR");
client.currentObject.display (getMsg("cli_icommandMsg3", ary[0].name), "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 ("Unknown command ``" + e.command + "'', just guessing.", "WARNING"); o.server.sendData (e.command + " " + e.inputData + "\n"); } else 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 (getMsg("cli_icommandMsg4", e.command), "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 ("Unknown command ``" + e.command + "'', just guessing.", "WARNING"); o.server.sendData (e.command + " " + e.inputData + "\n"); } else 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 (ary.length + " commands match: " + str, "ERROR");
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 ("Unknown command ``" + e.command + "'', just guessing.", "WARNING"); o.server.sendData (e.command + " " + e.inputData + "\n"); } else 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 ("Type /help <command-name> for " + "information about a specific " + "command.", "INFO");
client.currentObject.display (getMsg("cli_icommandsMsg"), "INFO");
function cli_icommands (e){ client.currentObject.display ("Type /help <command-name> for " + "information about a specific " + "command.", "INFO"); if (e && e.inputData) client.currentObject.display ("Currently implemented commands " + "matching the pattern ``" + e.inputData + "'' are [" + client.commands.listNames(e.inputData) .join(", ") + "].\n" + "Type /help <command-name> for " + "information about a specific " + "command.", "INFO"); else client.currentObject.display ("Currently implemented commands are [" + client.commands.listNames().join(", ") + "].", "INFO"); return true;}
if (e && e.inputData) client.currentObject.display ("Currently implemented commands " + "matching the pattern ``" + e.inputData + "'' are [" + client.commands.listNames(e.inputData) .join(", ") + "].\n" + "Type /help <command-name> for " + "information about a specific " + "command.", "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");
function cli_icommands (e){ client.currentObject.display ("Type /help <command-name> for " + "information about a specific " + "command.", "INFO"); if (e && e.inputData) client.currentObject.display ("Currently implemented commands " + "matching the pattern ``" + e.inputData + "'' are [" + client.commands.listNames(e.inputData) .join(", ") + "].\n" + "Type /help <command-name> for " + "information about a specific " + "command.", "INFO"); else client.currentObject.display ("Currently implemented commands are [" + client.commands.listNames().join(", ") + "].", "INFO"); return true;}
client.currentObject.display ("Currently implemented commands are [" + client.commands.listNames().join(", ") + "].", "INFO");
client.currentObject.display (getMsg("cli_icommandsMsg2b", matchResult), "INFO");
function cli_icommands (e){ client.currentObject.display ("Type /help <command-name> for " + "information about a specific " + "command.", "INFO"); if (e && e.inputData) client.currentObject.display ("Currently implemented commands " + "matching the pattern ``" + e.inputData + "'' are [" + client.commands.listNames(e.inputData) .join(", ") + "].\n" + "Type /help <command-name> for " + "information about a specific " + "command.", "INFO"); else client.currentObject.display ("Currently implemented commands are [" + client.commands.listNames().join(", ") + "].", "INFO"); return true;}
frames[0].document.location.href = "chrome:
for (var i = 0; i < client.deck.childNodes.length; i++) { client.deck.childNodes[i].loadURI ( "chrome: }
function cli_icss (e){ if (e.inputData) { e.inputData = stringTrim(e.inputData); if (e.inputData.search(/^light$/i) != -1) e.inputData = "chrome://chatzilla/skin/output-light.css"; else if (e.inputData.search(/^dark$/i) != -1) e.inputData = "chrome://chatzilla/skin/output-dark.css"; else if (e.inputData.search(/^default$/i) != -1) e.inputData = "chrome://chatzilla/skin/output-default.css"; else if (e.inputData.search(/^none$/i) != -1) e.inputData = "chrome://chatzilla/content/output-base.css"; frames[0].document.location.href = "chrome://chatzilla/content/outputwindow.html?" + e.inputData; client.DEFAULT_STYLE = e.inputData; } client.currentObject.display (getMsg("cli_icss", client.DEFAULT_STYLE), "INFO"); return true;}
client.currentObject.display ("You must be connected to a server to " + "use CTCP.", "ERROR");
client.currentObject.display (getMsg("cli_ictcpMsg"), "ERROR");
function cli_ictcp (e){ if (!e.inputData) return false; if (!e.server) { client.currentObject.display ("You must be connected to a server to " + "use CTCP.", "ERROR"); return false; } var ary = e.inputData.match(/^(\S+) (\S+)$/); if (ary == null) return false; e.server.ctcpTo (ary[1], ary[2]); return true; }
client.currentObject.display ("You must be on a channel to use " + "to use deop.", "ERROR");
client.currentObject.display (getMsg("cli_ideopMsg"), "ERROR");
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.display ("User ``" + e.inputData + "'' not found.",
client.currentObject.display (getMsg("cli_ideopMsg2",e.inputData),
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.display ("No such command, ``" + e.inputData + "''.", "ERROR");
client.currentObject.display (getMsg("cli_ihelpMsg", 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; }
var chan = e.server.channels[ary[1].toLowerCase()];
var encodeName = fromUnicode(ary[1] + " "); encodeName = encodeName.substr(0, encodeName.length -1); var chan = e.server.channels[encodeName.toLowerCase()];
function cli_iinvite (e) { if (!e.network || !e.network.isConnected()) { client.currentObject.display (getMsg("cli_iinviteMsg"), "ERROR"); return false; } else if (!e.channel) { client.currentObject.display (getMsg("cli_iinviteMsg2"), "ERROR"); return false; } if (!e.inputData) { return false; } else { var ary = e.inputData.split( /\s+/ ); if (ary.length == 1) { e.channel.invite (ary[0]); } else { var chan = e.server.channels[ary[1].toLowerCase()]; if (chan == undefined) { client.currentObject.display (getMsg("cli_iinviteMsg3", ary[1]), "ERROR"); return false; } chan.invite (ary[0]); } return true; }}
client.currentObject.display ("You must be connected to a network " + "to use invite.", "ERROR");
client.currentObject.display (getMsg("cli_iinviteMsg"), "ERROR");
function cli_iinvite (e) { if (!e.network || !e.network.isConnected()) { client.currentObject.display ("You must be connected to a network " + "to use invite.", "ERROR"); return false; } else if (!e.channel) { client.currentObject.display ("You must be in a channel to use invite", "ERROR"); return false; } if (!e.inputData) { return false; } else { var ary = e.inputData.split( /\s+/ ); if (ary.length == 1) { e.channel.invite (ary[0]); } else { var chan = e.server.channels[ary[1].toLowerCase()]; if (chan == undefined) { client.currentObject.display ("You must be on " + ary[1] + " to use invite.", "ERROR"); return false; } chan.invite (ary[0]); } return true; }}
client.currentObject.display ("You must be in a channel to use invite", "ERROR");
client.currentObject.display (getMsg("cli_iinviteMsg2"), "ERROR");
function cli_iinvite (e) { if (!e.network || !e.network.isConnected()) { client.currentObject.display ("You must be connected to a network " + "to use invite.", "ERROR"); return false; } else if (!e.channel) { client.currentObject.display ("You must be in a channel to use invite", "ERROR"); return false; } if (!e.inputData) { return false; } else { var ary = e.inputData.split( /\s+/ ); if (ary.length == 1) { e.channel.invite (ary[0]); } else { var chan = e.server.channels[ary[1].toLowerCase()]; if (chan == undefined) { client.currentObject.display ("You must be on " + ary[1] + " to use invite.", "ERROR"); return false; } chan.invite (ary[0]); } return true; }}
client.currentObject.display ("You must be on " + ary[1] + " to use invite.", "ERROR");
client.currentObject.display (getMsg("cli_iinviteMsg3", ary[1]), "ERROR");
function cli_iinvite (e) { if (!e.network || !e.network.isConnected()) { client.currentObject.display ("You must be connected to a network " + "to use invite.", "ERROR"); return false; } else if (!e.channel) { client.currentObject.display ("You must be in a channel to use invite", "ERROR"); return false; } if (!e.inputData) { return false; } else { var ary = e.inputData.split( /\s+/ ); if (ary.length == 1) { e.channel.invite (ary[0]); } else { var chan = e.server.channels[ary[1].toLowerCase()]; if (chan == undefined) { client.currentObject.display ("You must be on " + ary[1] + " to use invite.", "ERROR"); return false; } chan.invite (ary[0]); } return true; }}
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; }
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+)) *(\S+)?/); var name; var key = ""; var namelist; if (ary) { namelist = ary[1].split(/, */); if (5 in ary) key = ary[5]; } else { if (client.currentObject.TYPE == "IRCChannel") namelist = [client.currentObject.name]; else return false; if (client.currentObject.mode.key) key = client.currentObject.mode.key } 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); } return true;}
var 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+)) *(\S+)?/); var name; var key = ""; var namelist; if (ary) { namelist = ary[1].split(/, */); if (5 in ary) key = ary[5]; } else { if (client.currentObject.TYPE == "IRCChannel") namelist = [client.currentObject.name]; else return false; if (client.currentObject.mode.key) key = client.currentObject.mode.key } 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); } return true;}
namelist = [client.currentObject.name];
namelist = [client.currentObject.unicodeName];
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+)) *(\S+)?/); var name; var key = ""; var namelist; if (ary) { namelist = ary[1].split(/, */); if (5 in ary) key = ary[5]; } else { if (client.currentObject.TYPE == "IRCChannel") namelist = [client.currentObject.name]; else return false; if (client.currentObject.mode.key) key = client.currentObject.mode.key } 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); } return true;}
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); } return true;
return joinChannel(e, namelist, key, client.CHARSET);
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+)) *(\S+)?/); var name; var key = ""; var namelist; if (ary) { namelist = ary[1].split(/, */); if (5 in ary) key = ary[5]; } else { if (client.currentObject.TYPE == "IRCChannel") namelist = [client.currentObject.name]; else return false; if (client.currentObject.mode.key) key = client.currentObject.mode.key } 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); } return true;}
e.channel.display (getMsg("cli_ijoinMsg3",e.channel.name), "INFO");
{ e.channel.display (getMsg("cli_ijoinMsg3", e.channel.unicodeName), "INFO"); }
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+)) *(\S+)?/); var name; var key = ""; var namelist; if (ary) { namelist = ary[1].split(/, */); if (5 in ary) key = ary[5]; } else { if (client.currentObject.TYPE == "IRCChannel") namelist = [client.currentObject.name]; else return false; if (client.currentObject.mode.key) key = client.currentObject.mode.key } 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); } return true;}
client.currentObject.display ("No network selected.", "ERROR");
client.currentObject.display (getMsg("cli_ijoinMsg"), "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); if (!e.channel.messages) e.channel.display ("Channel view for ``" + e.channel.name + "'' opened.", "INFO"); setCurrentObject(e.channel); return true; }
client.currentObject.display ("Network ``" + e.network.name + "'' is not connected.", "ERROR");
client.currentObject.display (getMsg("cli_ijoinMsg2", e.network.name1), "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); if (!e.channel.messages) e.channel.display ("Channel view for ``" + e.channel.name + "'' opened.", "INFO"); setCurrentObject(e.channel); return true; }
e.channel.display ("Channel view for ``" + e.channel.name + "'' opened.", "INFO");
e.channel.display (getMsg("cli_ijoinMsg3",e.channel.name), "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); if (!e.channel.messages) e.channel.display ("Channel view for ``" + e.channel.name + "'' opened.", "INFO"); setCurrentObject(e.channel); return true; }
cuser.kick(ary[2]);
cuser.kick(fromUnicode(ary[2]));
function cli_ikick (e) { if (!e.channel) { client.currentObject.display (getMsg("cli_ikickMsg"), "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 (getMsg("cli_ikickMsg2", e.inputData), "ERROR"); return false; } if (ary.length > 2) { cuser.kick(ary[2]); } else cuser.kick(); return true;}
client.currentObject.display ("You must be on a channel to use " + "kick.", "ERROR");
client.currentObject.display (getMsg("cli_ikickMsg"), "ERROR");
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;}
client.currentObject.display ("User ``" + e.inputData + "'' not found.",
client.currentObject.display (getMsg("cli_ikickMsg2", e.inputData),
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;}
client.currentObject.act (e.inputData);
client.currentObject.act (fromUnicode(e.inputData));
function cli_ime (e){ if (typeof client.currentObject.act != "function") { client.currentObject.display (getMsg("cli_imeMsg"), "ERROR"); return false; } e.inputData = filterOutput (e.inputData, "ACTION", "ME!"); client.currentObject.display (e.inputData, "ACTION", "ME!", client.currentObject); client.currentObject.act (e.inputData); return true;}
client.currentObject.display ("Me cannot be used in this view.", "ERROR");
client.currentObject.display (getMsg("cli_imeMsg"), "ERROR");
function cli_ime (e){ if (typeof client.currentObject.act != "function") { client.currentObject.display ("Me cannot be used in this view.", "ERROR"); return false; } e.inputData = filterOutput (e.inputData, "ACTION", "ME!"); client.currentObject.display (e.inputData, "ACTION", "ME!", client.currentObject); client.currentObject.act (e.inputData); return true;}
usr.say (ary[2]);
usr.say (fromUnicode(ary[2]));
function cli_imsg (e){ if (!e.network || !e.network.isConnected()) { client.currentObject.display (getMsg("cli_imsgMsg4"), "ERROR"); return false; } var ary = e.inputData.match (/(\S+)\s+(.*)/); if (ary == null) return false; var usr = e.network.primServ.addUser(ary[1].toLowerCase()); var msg = filterOutput(ary[2], "PRIVMSG", "ME!"); client.currentObject.display (msg, "PRIVMSG", "ME!", usr); usr.say (ary[2]); return true;}
usr.say (fromUnicode(ary[2]));
usr.say (fromUnicode(ary[2], client.currentObject.charset));
function cli_imsg (e){ if (!e.network || !e.network.isConnected()) { client.currentObject.display (getMsg("cli_imsgMsg4"), "ERROR"); return false; } var ary = e.inputData.match (/(\S+)\s+(.*)/); if (ary == null) return false; var usr = e.network.primServ.addUser(ary[1].toLowerCase()); var msg = filterOutput(ary[2], "PRIVMSG", "ME!"); client.currentObject.display (msg, "PRIVMSG", "ME!", usr); usr.say (fromUnicode(ary[2])); return true;}
client.currentObject.display ("You must be connected to a network " + "to use msg", "ERROR");
client.currentObject.display (getMsg("cli_imsgMsg4"), "ERROR");
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()); var msg = filterOutput(ary[2], "PRIVMSG", "ME!"); client.currentObject.display (msg, "PRIVMSG", "ME!", usr); usr.say (ary[2]); return true;}
chan = e.inputData;
var encodeName = fromUnicode(e.inputData + " "); encodeName = encodeName.substr(0, encodeName.length -1); chan = encodeName;
function cli_inames (e){ var chan; if (!e.network) { client.currentObject.display (getMsg("cli_inamesMsg"), "ERROR"); return false; } if (e.inputData) { if (!e.network.isConnected()) { client.currentObject.display (getMsg("cli_inamesMsg2", e.network.name), "ERROR"); return false; } chan = e.inputData; } else { if (client.currentObject.TYPE != "IRCChannel") { client.currentObject.display (getMsg("cli_inamesMsg3"),"ERROR"); return false; } chan = e.channel.name; } client.currentObject.pendingNamesReply = true; e.server.sendData ("NAMES " + chan + "\n"); return true; }
client.currentObject.display ("/names cannot be used from this " + "view.", "ERROR");
client.currentObject.display (getMsg("cli_inamesMsg"), "ERROR");
function cli_inames (e){ var chan; 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"); return true; }