Function: erc-server-005
erc-server-005 is a byte-compiled function defined in
erc-backend.el.gz.
Signature
(erc-server-005 PROC PARSED)
Documentation
Set the variable erc-server-parameters and display the received message.
According to RFC 2812, suggests alternate servers on the network.
Many servers, however, use this code to show which parameters they have set,
for example, the network identifier, maximum allowed topic length, whether
certain commands are accepted and more. See documentation for
erc-server-parameters for more information on the parameters sent.
A server may send more than one 005 message.
Handler for a 005 server response.
PROC is the server process which returned the response.
PARSED is the actual response as an erc-response struct.
If you want to add responses don't modify this function, but rather
add things to erc-server-005-functions instead.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-backend.el.gz
(define-erc-response-handler (005)
"Set the variable `erc-server-parameters' and display the received message.
According to RFC 2812, suggests alternate servers on the network.
Many servers, however, use this code to show which parameters they have set,
for example, the network identifier, maximum allowed topic length, whether
certain commands are accepted and more. See documentation for
`erc-server-parameters' for more information on the parameters sent.
A server may send more than one 005 message."
nil
(unless erc--isupport-params
(setq erc--isupport-params (make-hash-table)))
(let* ((args (cdr (erc-response.command-args parsed)))
(line (string-join args " ")))
(while args
(let ((section (pop args))
key
value
negated)
(when (string-match "^\\([A-Z]+\\)=\\(.*\\)$\\|^\\(-\\)?\\([A-Z]+\\)$"
section)
(setq key (or (match-string 1 section) (match-string 4 section))
value (match-string 2 section)
negated (and (match-string 3 section) '-))
(setf (alist-get key erc-server-parameters '- 'remove #'equal)
(or value negated))
(remhash (intern key) erc--isupport-params))))
(erc-display-message parsed 'notice proc line)
nil))