From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- comm/suite/chatzilla/xul/content/commands.js | 4760 ++++++++++++++++++++++++++ 1 file changed, 4760 insertions(+) create mode 100644 comm/suite/chatzilla/xul/content/commands.js (limited to 'comm/suite/chatzilla/xul/content/commands.js') diff --git a/comm/suite/chatzilla/xul/content/commands.js b/comm/suite/chatzilla/xul/content/commands.js new file mode 100644 index 0000000000..a99ca52c3e --- /dev/null +++ b/comm/suite/chatzilla/xul/content/commands.js @@ -0,0 +1,4760 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +const CMD_CONSOLE = 0x01; +const CMD_NEED_NET = 0x02; +const CMD_NEED_SRV = 0x04; +const CMD_NEED_CHAN = 0x08; +const CMD_NEED_USER = 0x10; + +function initCommands() +{ + // Keep this in sync with the command.js section in chatzilla.properties. + var cmdary = + [/* "real" commands */ + ["about", cmdAbout, CMD_CONSOLE], + ["alias", cmdAlias, CMD_CONSOLE, + "[ []]"], + ["attach", cmdAttach, CMD_CONSOLE, + ""], + ["away", cmdAway, CMD_CONSOLE, + "[]"], + ["back", cmdAway, CMD_CONSOLE], + ["ban", cmdBanOrExcept, CMD_NEED_CHAN | CMD_CONSOLE, + "[]"], + ["cancel", cmdCancel, CMD_CONSOLE], + ["charset", cmdCharset, CMD_CONSOLE, + "[]"], + ["channel-motif", cmdMotif, CMD_NEED_CHAN | CMD_CONSOLE, + "[ []]"], + ["channel-pref", cmdPref, CMD_NEED_CHAN | CMD_CONSOLE, + "[ []]"], + ["cmd-undo", "cmd-docommand cmd_undo", 0], + ["cmd-redo", "cmd-docommand cmd_redo", 0], + ["cmd-cut", "cmd-docommand cmd_cut", 0], + ["cmd-copy", "cmd-docommand cmd_copy", 0], + ["cmd-paste", "cmd-docommand cmd_paste", 0], + ["cmd-delete", "cmd-docommand cmd_delete", 0], + ["cmd-selectall", "cmd-docommand cmd_selectAll", 0], + ["cmd-copy-link-url", "cmd-docommand cmd_copyLink", 0, + ""], + ["cmd-mozilla-prefs", "cmd-docommand cmd_mozillaPrefs", 0], + ["cmd-prefs", "cmd-docommand cmd_chatzillaPrefs", 0], + ["cmd-chatzilla-prefs", "cmd-docommand cmd_chatzillaPrefs", 0], + ["cmd-chatzilla-opts", "cmd-docommand cmd_chatzillaPrefs", 0], + ["cmd-docommand", cmdDoCommand, 0, + ""], + ["create-tab-for-view", cmdCreateTabForView, 0, + ""], + ["custom-away", cmdAway, 0], + ["op", cmdChanUserMode, CMD_NEED_CHAN | CMD_CONSOLE, + " [<...>]"], + ["dcc-accept", cmdDCCAccept, CMD_CONSOLE, + "[ [ []]]"], + ["dcc-accept-list", cmdDCCAutoAcceptList, CMD_NEED_NET | CMD_CONSOLE], + ["dcc-accept-list-add", cmdDCCAutoAcceptAdd, + CMD_NEED_NET | CMD_CONSOLE, + ""], + ["dcc-accept-list-remove", cmdDCCAutoAcceptDel, + CMD_NEED_NET | CMD_CONSOLE, + ""], + ["dcc-chat", cmdDCCChat, CMD_NEED_SRV | CMD_CONSOLE, + "[]"], + ["dcc-close", cmdDCCClose, CMD_CONSOLE, + "[ [ []]]"], + ["dcc-decline", cmdDCCDecline, CMD_CONSOLE, + "[]"], + ["dcc-list", cmdDCCList, CMD_CONSOLE, + "[]"], + ["dcc-send", cmdDCCSend, CMD_NEED_SRV | CMD_CONSOLE, + "[ []]"], + ["dcc-show-file", cmdDCCShowFile, CMD_CONSOLE, + ""], + ["delayed", cmdDelayed, CMD_CONSOLE, + " "], + ["deop", cmdChanUserMode, CMD_NEED_CHAN | CMD_CONSOLE, + " [<...>]"], + ["describe", cmdDescribe, CMD_NEED_SRV | CMD_CONSOLE, + " "], + ["hop", cmdChanUserMode, CMD_NEED_CHAN | CMD_CONSOLE, + " [<...>]"], + ["dehop", cmdChanUserMode, CMD_NEED_CHAN | CMD_CONSOLE, + " [<...>]"], + ["voice", cmdChanUserMode, CMD_NEED_CHAN | CMD_CONSOLE, + " [<...>]"], + ["devoice", cmdChanUserMode, CMD_NEED_CHAN | CMD_CONSOLE, + " [<...>]"], + ["clear-view", cmdClearView, CMD_CONSOLE, + "[]"], + ["client", cmdClient, CMD_CONSOLE], + ["commands", cmdCommands, CMD_CONSOLE, + "[]"], + ["ctcp", cmdCTCP, CMD_NEED_SRV | CMD_CONSOLE, + " []"], + ["default-charset", cmdCharset, CMD_CONSOLE, + "[]"], + ["delete-view", cmdDeleteView, CMD_CONSOLE, + "[]"], + ["desc", cmdDesc, CMD_CONSOLE, + "[]"], + ["disable-plugin", cmdDisablePlugin, CMD_CONSOLE], + ["disconnect", cmdDisconnect, CMD_NEED_SRV | CMD_CONSOLE, + "[]"], + ["disconnect-all", cmdDisconnectAll, CMD_CONSOLE, + "[]"], + ["echo", cmdEcho, CMD_CONSOLE, + ""], + ["edit-networks", cmdEditNetworks, CMD_CONSOLE], + ["enable-plugin", cmdEnablePlugin, CMD_CONSOLE, + ""], + ["eval", cmdEval, CMD_CONSOLE, + ""], + ["evalsilent", cmdEval, CMD_CONSOLE, + ""], + ["except", cmdBanOrExcept, CMD_NEED_CHAN | CMD_CONSOLE, + "[]"], + ["find", cmdFind, 0, + "[]"], + ["find-again", cmdFindAgain, 0], + ["focus-input", cmdFocusInput, 0], + ["font-family", cmdFont, CMD_CONSOLE, + "[]"], + ["font-family-other", cmdFont, 0], + ["font-size", cmdFont, CMD_CONSOLE, + "[]"], + ["font-size-other", cmdFont, 0], + ["goto-startup", cmdGotoStartup, CMD_CONSOLE], + ["goto-url", cmdGotoURL, 0, + " []"], + ["goto-url-newwin", cmdGotoURL, 0, + " []"], + ["goto-url-newtab", cmdGotoURL, 0, + " []"], + ["help", cmdHelp, CMD_CONSOLE, + "[]"], + ["hide-view", cmdHideView, CMD_CONSOLE, + "[]"], + ["identify", cmdIdentify, CMD_NEED_SRV | CMD_CONSOLE, + "[]"], + ["idle-away", cmdAway, 0], + ["idle-back", cmdAway, 0], + ["ignore", cmdIgnore, CMD_NEED_NET | CMD_CONSOLE, + "[]"], + ["input-text-direction", cmdInputTextDirection, 0, + ""], + ["install-plugin", cmdInstallPlugin, CMD_CONSOLE, + "[ []]"], + ["invite", cmdInvite, CMD_NEED_SRV | CMD_CONSOLE, + " []"], + ["join", cmdJoin, CMD_NEED_SRV | CMD_CONSOLE, + "[ []]"], + ["join-charset", cmdJoin, CMD_NEED_SRV | CMD_CONSOLE, + "[ []]"], + ["jump-to-anchor", cmdJumpToAnchor, CMD_NEED_NET, + " []"], + ["kick", cmdKick, CMD_NEED_CHAN | CMD_CONSOLE, + " []"], + ["kick-ban", cmdKick, CMD_NEED_CHAN | CMD_CONSOLE, + " []"], + ["knock", cmdKnock, CMD_NEED_SRV | CMD_CONSOLE, + " []"], + ["leave", cmdLeave, CMD_NEED_NET | CMD_CONSOLE, + "[] []"], + ["links", cmdSimpleCommand, CMD_NEED_SRV | CMD_CONSOLE], + ["list", cmdList, CMD_NEED_SRV | CMD_CONSOLE, + "[]"], + ["list-plugins", cmdListPlugins, CMD_CONSOLE, + "[]"], + ["load", cmdLoad, CMD_CONSOLE, + ""], + ["log", cmdLog, CMD_CONSOLE, + "[]"], + ["map", cmdSimpleCommand, CMD_NEED_SRV | CMD_CONSOLE], + ["marker", cmdMarker, CMD_CONSOLE], + ["marker-clear", cmdMarker, CMD_CONSOLE], + ["marker-set", cmdMarker, CMD_CONSOLE], + ["match-users", cmdMatchUsers, CMD_NEED_CHAN | CMD_CONSOLE, + ""], + ["me", cmdMe, CMD_CONSOLE, + ""], + ["motd", cmdSimpleCommand, CMD_NEED_SRV | CMD_CONSOLE], + ["mode", cmdMode, CMD_NEED_SRV | CMD_CONSOLE, + "[] [ [ [<...>]]]"], + ["motif", cmdMotif, CMD_CONSOLE, + "[]"], + ["msg", cmdMsg, CMD_NEED_SRV | CMD_CONSOLE, + " "], + ["name", cmdName, CMD_CONSOLE, + "[]"], + ["names", cmdNames, CMD_NEED_SRV | CMD_CONSOLE, + "[]"], + ["network", cmdNetwork, CMD_CONSOLE, + ""], + ["network-motif", cmdMotif, CMD_NEED_NET | CMD_CONSOLE, + "[ []]"], + ["network-pref", cmdPref, CMD_NEED_NET | CMD_CONSOLE, + "[ []]"], + ["networks", cmdNetworks, CMD_CONSOLE], + ["nick", cmdNick, CMD_CONSOLE, + "[]"], + ["notice", cmdNotice, CMD_NEED_SRV | CMD_CONSOLE, + " "], + ["notify", cmdNotify, CMD_NEED_SRV | CMD_CONSOLE, + "[ [<...>]]"], + ["open-at-startup", cmdOpenAtStartup, CMD_CONSOLE, + "[]"], + ["oper", cmdOper, CMD_NEED_SRV | CMD_CONSOLE, + " []"], + ["ping", cmdPing, CMD_NEED_SRV | CMD_CONSOLE, + ""], + ["plugin-pref", cmdPref, CMD_CONSOLE, + " [ []]"], + ["pref", cmdPref, CMD_CONSOLE, + "[ []]"], + ["print", cmdPrint, CMD_CONSOLE], + ["query", cmdQuery, CMD_NEED_SRV | CMD_CONSOLE, + " []"], + ["quit", cmdQuit, CMD_CONSOLE, + "[]"], + ["quote", cmdQuote, CMD_NEED_NET | CMD_CONSOLE, + ""], + ["rename", cmdRename, CMD_CONSOLE, + "[