Function: erc-autojoin-server-match

erc-autojoin-server-match is a byte-compiled function defined in erc-join.el.gz.

Signature

(erc-autojoin-server-match CANDIDATE)

Documentation

Match the current network ID or server against CANDIDATE.

CANDIDATE is a key from erc-autojoin-channels-alist. Return the matching entity, either a string or a non-nil symbol (in the case of a network or a network ID). Return nil on failure.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-join.el.gz
(defun erc-autojoin-server-match (candidate)
  "Match the current network ID or server against CANDIDATE.
CANDIDATE is a key from `erc-autojoin-channels-alist'.  Return the
matching entity, either a string or a non-nil symbol (in the case of a
network or a network ID).  Return nil on failure."
  (if (symbolp candidate)
      (eq (or (erc-networks--id-given erc-networks--id) (erc-network))
          candidate)
    (when (stringp candidate)
      (string-match-p candidate (or erc-server-announced-name
                                    erc-session-server)))))