Function: erc-networks--determine

erc-networks--determine is a byte-compiled function defined in erc-networks.el.gz.

Signature

(erc-networks--determine &optional SERVER)

Documentation

Return the name of the network as a symbol.

Search erc-networks-alist for a known entity matching SERVER or erc-server-announced-name. If that fails, use the display name given by the RPL_ISUPPORT NETWORK parameter.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-networks.el.gz
(defun erc-networks--determine (&optional server)
  "Return the name of the network as a symbol.
Search `erc-networks-alist' for a known entity matching SERVER or
`erc-server-announced-name'.  If that fails, use the display name
given by the `RPL_ISUPPORT' NETWORK parameter."
  (or (cl-loop for (name matcher) in erc-networks-alist
               when (and matcher
                         (string-match (concat matcher "\\'")
                                       (or server erc-server-announced-name)))
               return name)
      (and-let* ((vanity (erc--get-isupport-entry 'NETWORK 'single))
                 ((intern vanity))))
      (erc-networks--id-given erc-networks--id)
      erc-networks--name-missing-sentinel))