Server IP : 111.118.215.189 / Your IP : 18.117.158.174 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/emacs/24.3/lisp/erc/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:08:35 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/erc/erc-dcc.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303\304\305\306\307\310\311\312\313\314\315&\207" [require erc custom-declare-variable erc-dcc-mode nil "Non-nil if Erc-Dcc mode is enabled.\nSee the command `erc-dcc-mode' for a description of this minor mode.\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `erc-dcc-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :group erc-dcc :type boolean] 12) #@220 Toggle ERC dcc mode. With a prefix argument ARG, enable dcc if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. Provide Direct Client-to-Client support for ERC. (defalias 'erc-dcc-mode #[(&optional arg) "\303 \304=\203 \n?\202 \305 !\306V\211\203 \307 \210\202! \310 \210\311\312\n\203+ \313\202, \314\"\210\315\316!\203Q \317\302!\210\303 \203D \303 \232\203Q \320\321\n\203N \322\202O \323\"\210)\324 \210\n\207" [#1=#:last-message arg erc-dcc-mode current-message toggle prefix-numeric-value 0 erc-dcc-enable erc-dcc-disable run-hooks erc-dcc-mode-hook erc-dcc-mode-on-hook erc-dcc-mode-off-hook called-interactively-p any customize-mark-as-set message "Erc-Dcc mode %sabled" "en" "dis" force-mode-line-update] 4 (#$ . 1051) (list (or current-prefix-arg 'toggle))]) (byte-code "\301\302\303\304\300!\205\n \303\211%\207" [erc-dcc-mode-map add-minor-mode erc-dcc-mode nil boundp] 6) #@22 Enable ERC dcc mode. (defalias 'erc-dcc-enable #[nil "\301\302\303\"\210\304\305\306\307\"\207" [erc-dcc-mode add-to-list erc-modules dcc t add-hook erc-server-401-functions erc-dcc-no-such-nick] 3 (#$ . 2008) nil]) #@23 Disable ERC dcc mode. (defalias 'erc-dcc-disable #[nil "\302\303\"\304\305\306\307\"\207" [erc-modules erc-dcc-mode delq dcc nil remove-hook erc-server-401-functions erc-dcc-no-such-nick] 3 (#$ . 2231) nil]) (byte-code "\300\301\302\303#\210\300\304\302\303#\210\300\305\302\303#\210\306\307\310\311\312\313%\210\314\315\310\316\312\307\317\320&\207" [put erc-dcc-mode definition-name dcc erc-dcc-enable erc-dcc-disable custom-declare-group erc-dcc nil "DCC stands for Direct Client Communication, where you and your\nfriend's client programs connect directly to each other,\nbypassing IRC servers and their occasional \"lag\" or \"split\"\nproblems. Like /MSG, the DCC chat is completely private.\n\nUsing DCC get and send, you can transfer files directly from and to other\nIRC users." :group erc custom-declare-variable erc-dcc-verbose "If non-nil, be verbose about DCC activity reporting." :type boolean] 8) #@87 List of valid DCC connection types. All values of the list must be uppercase strings. (defconst erc-dcc-connection-types '("CHAT" "GET" "SEND") (#$ . 3154)) #@1166 List of DCC connections. Looks like: ((:nick "nick!user@host" :type GET :peer proc :parent proc :size size :file file) (:nick "nick!user@host" :type CHAT :peer proc :parent proc) (:nick "nick" :type SEND :peer server-proc :parent parent-proc :file file :sent <marker> :confirmed <marker>)) :nick - a user or userhost for the peer. combine with :parent to reach them :type - the type of DCC connection - SEND for outgoing files, GET for incoming, and CHAT for both directions. To tell which end started the DCC chat, look at :peer :peer - the other end of the DCC connection. In the case of outgoing DCCs, this represents a server process until a connection is established :parent - the server process where the dcc connection was established. Note that this can be nil or an invalid process since a DCC connection is in general independent from a particular server connection after it was established. :file - for outgoing sends, the full path to the file. for incoming sends, the suggested filename or vetted filename :size - size of the file, may be nil on incoming DCCs (defvar erc-dcc-list nil (#$ . 3319)) #@63 Add a new entry of type TYPE to `erc-dcc-list' and return it. (defalias 'erc-dcc-list-add #[(type nick peer parent &rest args) "\306\307\310 \311\n\312\257\f\" B\211@\207" [nick type peer parent args erc-dcc-list append :nick :type :peer :parent] 9 (#$ . 4528)]) (defvar erc-dcc-connect-function 'erc-dcc-open-network-stream) (defalias 'erc-dcc-open-network-stream #[(procname buffer addr port entry) "\304 \n$\207" [procname buffer addr port open-network-stream] 5]) (erc-define-catalog 'english '((dcc-chat-discarded . "DCC: previous chat request from %n (%u@%h) discarded") (dcc-chat-ended . "DCC: chat with %n ended %t: %e") (dcc-chat-no-request . "DCC: chat request from %n not found") (dcc-chat-offered . "DCC: chat offered by %n (%u@%h:%p)") (dcc-chat-offer . "DCC: offering chat to %n") (dcc-chat-accept . "DCC: accepting chat from %n") (dcc-chat-privmsg . "=%n= %m") (dcc-closed . "DCC: Closed %T from %n") (dcc-command-undefined . "DCC: %c undefined subcommand. GET, CHAT and LIST are defined.") (dcc-ctcp-errmsg . "DCC: `%s' is not a DCC subcommand known to this client") (dcc-ctcp-unknown . "DCC: unknown dcc command `%q' from %n (%u@%h)") (dcc-get-bytes-received . "DCC: %f: %b bytes received") (dcc-get-complete . "DCC: file %f transfer complete (%s bytes in %t seconds)") (dcc-get-cmd-aborted . "DCC: Aborted getting %f from %n") (dcc-get-file-too-long . "DCC: %f: File longer than sender claimed; aborting transfer") (dcc-get-notfound . "DCC: %n hasn't offered %f for DCC transfer") (dcc-list-head . "DCC: From Type Active Size Filename") (dcc-list-line . "DCC: -------- ---- ------ -------------- --------") (dcc-list-item . "DCC: %-8n %-4t %-6a %-14s %f") (dcc-list-end . "DCC: End of list.") (dcc-malformed . "DCC: error: %n (%u@%h) sent malformed request: %q") (dcc-privileged-port . "DCC: possibly bogus request: %p is a privileged port.") (dcc-request-bogus . "DCC: bogus dcc `%r' from %n (%u@%h)") (dcc-send-finished . "DCC: SEND of %f to %n finished (size %s)") (dcc-send-offered . "DCC: file %f offered by %n (%u@%h) (size %s)") (dcc-send-offer . "DCC: offering %f to %n"))) #@420 Return the first matching entry in `erc-dcc-list' which satisfies the constraints given as a plist in ARGS. Returns nil on no match. The property :nick is treated specially, if it contains a '!' character, it is treated as a nick!user@host string, and compared with the :nick property value of the individual elements using string-equal. Otherwise it is compared with `erc-nick-equal-p' which is IRC case-insensitive. (defalias 'erc-dcc-member #[(&rest args) "\306\211\203\235 \n\204\235 @\f\307\203\214 \203\214 @\211A@)\211AA)\310\"\205H \311\"\312=\203c \313\314\"\203c \203c \230\204\210 \312=\203 \203 \203 \315\316 !\316!\"\204\210 =\204\210 \306*\202 \203\226 \202\231 A+\202 \n+\207" [erc-dcc-list test result list args cont nil t plist-member plist-get :nick string-match "!" erc-nick-equal-p erc-extract-nick prem elt x val prop] 5 (#$ . 6667)]) #@85 Convert an integer into a packed string in network byte order, which is big-endian. (defalias 'erc-pack-int #[(value) "\304W\203\n \305\306!\210\304U\203 \304\202! \307\211\310!\310\311!\245!\312\245!\211\313V\203, \305\314!\210)\315\313\304\"\316\n\304Y\203R \304V\203R \n\317\246I\210\317\245\nS\211\2025 *\207" [value len i str 0 error "ERC-DCC (erc-pack-int): packet size is negative" ceiling log 2 8.0 4 "ERC-DCC (erc-pack-int): packet too large" make-string 3 256] 6 (#$ . 7599)]) #@39 Maximum number of bytes for a fixnum. (defconst erc-most-positive-int-bytes (byte-code "\301\211\302!\302\303!\245!\304\245!\207" [most-positive-fixnum ceiling log 2 8.0] 5) (#$ . 8106)) #@63 Content of the most significant byte of most-positive-fixnum. (defconst erc-most-positive-int-msb (byte-code "\302 S\303_[\"\207" [most-positive-fixnum erc-most-positive-int-bytes lsh 8] 4) (#$ . 8300)) #@41 Unpack a packed string into an integer. (defalias 'erc-unpack-int #[(str) "G\306 \nV\203 \nH\306=\203 \nT\202 \n\306V\203( \n\307O \nZ) \310^V\204? =\203C \306H\fV\203C \311\312!\210\306\211 W\203f \313\314 \315#H \316_\"\\ T\211\202I +\207" [str len start erc-most-positive-int-bytes erc-most-positive-int-msb count 0 nil 4 error "ERC-DCC (erc-unpack-int): packet to send is too large" lsh - 1 8 num] 8 (#$ . 8510)]) (defconst erc-dcc-ipv4-regexp (byte-code "\300\301\302\303\304\305\"\306#\307Q\207" ["^" mapconcat identity make-list 4 "\\([0-9]\\{1,3\\}\\)" "\\." "$"] 6)) #@121 Convert IP address to its decimal representation. Argument IP is the address as a string. The result is also a string. (defalias 'erc-ip-to-decimal #[(ip) "\304 \"\204 \305\306!\207\307\310\311 \312\"\"\313\n@\314_\nA@\315_\316\n8\317_\320\n8$\321 \2034 \322\323 #\2028 \324\325\"*\207" [erc-dcc-ipv4-regexp ip ips res string-match error "Not an IP address" mapcar #[(str) "\302!\211\303Y\203 \304W\203 \202 \305\306 \")\207" [str n string-to-number 0 256 error "%d out of range"] 4] split-string "\\." + 16777216.0 65536.0 2 256.0 3 interactive-p message "%s is %.0f" format "%.0f"] 6 (#$ . 9121) "sIP Address: "]) #@85 Convert a decimal representation DEC to an IP address. The result is also a string. (defalias 'erc-decimal-to-ip #[(dec) ";\203 \306\307P!\310\311\245! \312_Z\310\n\313\245!\n\314_Z\310\f\315\245!\f \316_Z\310!\317\320 %.\207" [dec first first-rest second second-rest third string-to-number ".0" floor 16777216.0 16777216.0 65536.0 65536.0 256.0 256.0 format "%s.%s.%s.%s" third-rest fourth] 6 (#$ . 9757)]) (byte-code "\301\302\303\304\305\306\307\310\311\312\313\303F\314\312\315\316\257E&\210\301\317\303\320\305\306\307\310\311\312\321\303F\314\312\315\316\257E&\210\301\322\323\324\305\306\307\325&\207" [erc-dcc-ipv4-regexp custom-declare-variable erc-dcc-listen-host nil "IP address to listen on when offering files.\nShould be set to a string or nil. If nil, automatic detection of\nthe host interface to use will be attempted." :group erc-dcc :type choice const :tag "Auto-detect" string "IP-address" :valid-regexp erc-dcc-public-host "IP address to use for outgoing DCC offers.\nShould be set to a string or nil. If nil, use the value of\n`erc-dcc-listen-host'." "Same as erc-dcc-listen-host" erc-dcc-send-request 'ask "How to treat incoming DCC Send requests.\n'ask - Report the Send request, and wait for the user to manually accept it\n You might want to set `erc-dcc-auto-masks' for this.\n'auto - Automatically accept the request and begin downloading the file\n'ignore - Ignore incoming DCC Send requests completely." (choice (const ask) (const auto) (const ignore))] 14) #@56 Returns the local IP address used for an open PROCess. (defalias 'erc-dcc-get-host #[(proc) "\301\302\303\"\304\"\207" [proc format-network-address process-contact :local t] 4 (#$ . 11289)]) #@149 Determine the IP address we are using. If variable `erc-dcc-host' is non-nil, use it. Otherwise call `erc-dcc-get-host' on the erc-server-process. (defalias 'erc-dcc-host #[nil "\206 \302 !\206 \303\304!\207" [erc-dcc-listen-host erc-server-process erc-dcc-get-host error "Unable to determine local address"] 2 (#$ . 11488)]) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\302\311\304\305\306\312&\207" [custom-declare-variable erc-dcc-port-range nil "If nil, any available user port is used for outgoing DCC connections.\nIf set to a cons, it specifies a range of ports to use in the form (min . max)" :group erc-dcc :type (choice (const :tag "Any port" nil) (cons :tag "Port range" (integer :tag "Lower port") (integer :tag "Upper port"))) erc-dcc-auto-masks "List of regexps matching user identifiers whose DCC send offers should be\naccepted automatically. A user identifier has the form \"nick!login@host\".\nFor instance, to accept all incoming DCC send offers automatically, add the\nstring \".*!.*@.*\" to this list." (repeat regexp)] 8) #@105 Start listening on a port for an incoming DCC connection. Returns the newly created subprocess, or nil. (defalias 'erc-dcc-server #[(name filter sentinel) "\203 @\206\n \304\205 A\305 \204 \306\307\310\217\210\202 +\207" [erc-dcc-port-range process upper port t nil err (byte-code "\305\306\307\310\311\312 \313 \314\315\316\310\317\n\320\321\322\323\315&\324\f!\2036 \325\326!\203+ \326\f\327\211#\210\325\330!\2036 \330\f\310\"\210\310\207" [name port filter sentinel process make-network-process :name :buffer nil :host erc-dcc-host :service :nowait t :noquery :filter :sentinel :log erc-dcc-server-accept :server processp fboundp set-process-coding-system binary set-process-filter-multibyte] 21) ((file-error (byte-code "\211A@)\304\230\203 AA@\305\230\204 \306@A\"\210\nT\211W\204( \307\310!\210\306\207" [err x port upper "Cannot bind server socket" "address already in use" signal error "No available ports in erc-dcc-port-range"] 4)))] 3 (#$ . 12559)]) #@101 Log an accepted DCC offer, then terminate the listening process and set up the accepted connection. (defalias 'erc-dcc-server-accept #[(server client message) "\306\307 \n$\f\203 \310!\210)\311\312\n\"\2052 \313!\2052 \313 !\2052 \314\315\"\316 \315 #\317!)\207" [server client message string erc-log-p elt format "(erc-dcc-server-accept): server %s client %s message %s" erc-log-aux string-match "^accept from " processp erc-dcc-member :peer plist-put delete-process] 5 (#$ . 13553)]) #@123 Default directory for incoming DCC file transfers. If this is nil, then the current value of `default-directory' is used. (custom-declare-variable 'erc-dcc-get-default-directory nil '(#$ . 14055) :group 'erc-dcc :type '(choice (const nil :tag "Default directory") directory)) #@232 Parser for /dcc command. This figures out the dcc subcommand and calls the appropriate routine to handle it. The function dispatched should be named "erc-dcc-do-FOO-command", where FOO is one of CLOSE, GET, SEND, LIST, CHAT, etc. (defalias 'erc-cmd-DCC #[(cmd &rest args) "\205( \304\305\226\306Q!\211\203 \307 \n#\202'