Function: erc--init-cusr-fallback-status

erc--init-cusr-fallback-status is a byte-compiled function defined in erc.el.gz.

Signature

(erc--init-cusr-fallback-status VOICE HALFOP OP ADMIN OWNER)

Documentation

Return channel-membership based on traditional status semantics.

Massage boolean switches VOICE, HALFOP, OP, ADMIN, and OWNER into an internal numeric value suitable for the status slot of a new erc-channel-user object.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc--init-cusr-fallback-status (voice halfop op admin owner)
  "Return channel-membership based on traditional status semantics.
Massage boolean switches VOICE, HALFOP, OP, ADMIN, and OWNER into
an internal numeric value suitable for the `status' slot of a new
`erc-channel-user' object."
  (let ((pfx (erc--parsed-prefix)))
    (+ (if voice  (if pfx (or (erc--get-prefix-flag ?v pfx) 0)  1) 0)
       (if halfop (if pfx (or (erc--get-prefix-flag ?h pfx) 0)  2) 0)
       (if op     (if pfx (or (erc--get-prefix-flag ?o pfx) 0)  4) 0)
       (if admin  (if pfx (or (erc--get-prefix-flag ?a pfx) 0)  8) 0)
       (if owner  (if pfx (or (erc--get-prefix-flag ?q pfx) 0) 16) 0))))