Function: erc--interpret-nuh
erc--interpret-nuh is a byte-compiled function defined in erc.el.gz.
Signature
(erc--interpret-nuh NUH &optional CMD NOERRORP)
Documentation
Return new NUH triple with non-nil nickname or host component, or signal.
If CMD is null or appears in erc--user-nuh-message-types, promote a
lone host to a lone nick. With NOERRORP, return a copy of NUH instead
of signaling.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc--interpret-nuh (nuh &optional cmd noerrorp)
"Return new NUH triple with non-nil nickname or host component, or signal.
If CMD is null or appears in `erc--user-nuh-message-types', promote a
lone host to a lone nick. With NOERRORP, return a copy of NUH instead
of signaling."
(pcase-let ((`(,nick ,login ,host) nuh))
(cond (nick (list nick login host))
((and (null login) host)
(if (or (null cmd) (memq cmd erc--user-nuh-message-types))
(list host nil nil)
(list nil nil host)))
((and login
(let ((types (or (erc--get-isupport-entry 'CHANTYPES 'single)
erc--fallback-channel-prefixes)))
(not (seq-some (lambda (c) (seq-contains-p types c #'eq))
login))))
(list login nil host))
(noerrorp (list nick login host))
(t (error "Failed to interpret: %s" nuh)))))