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
(let ((line (mapconcat #'identity
(setf (erc-response.command-args parsed)
(cdr (erc-response.command-args parsed)))
" ")))
(while (erc-response.command-args parsed)
(let ((section (pop (erc-response.command-args parsed))))
;; fill erc-server-parameters
(when (string-match "^\\([A-Z]+\\)=\\(.*\\)$\\|^\\([A-Z]+\\)$"
section)
(add-to-list 'erc-server-parameters
`(,(or (match-string 1 section)
(match-string 3 section))
.
,(match-string 2 section))))))
(erc-display-message parsed 'notice proc line)))