Variable: erc-sasl-mode-hook

erc-sasl-mode-hook is a customizable variable defined in erc-sasl.el.gz.

Value

nil

Documentation

Hook run after entering or leaving erc-sasl-mode(var)/erc-sasl-mode(fun).

No problems result if this variable is not bound. add-hook automatically binds it. (This is true for all hook variables.)

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-sasl.el.gz
(define-erc-module sasl nil
  "Non-IRCv3 SASL support for ERC.
This doesn't solicit or validate a suite of supported mechanisms."
  ;; See bug#49860 for a CAP 3.2-aware WIP implementation.
  ((unless erc--target
     (setq erc-sasl--state (make-erc-sasl--state))
     ;; If the previous attempt failed during registration, this may be
     ;; non-nil and contain erroneous values, but how can we detect that?
     ;; What if the server dropped the connection for some other reason?
     (erc--restore-initialize-priors erc-sasl-mode
       erc-sasl--options `((user . ,erc-sasl-user)
                           (password . ,erc-sasl-password)
                           (mechanism . ,erc-sasl-mechanism)
                           (authfn . ,erc-sasl-auth-source-function)
                           (authzid . ,erc-sasl-authzid)))
     (let* ((mech (alist-get 'mechanism erc-sasl--options))
            (client (erc-sasl--create-client mech)))
       (unless client
         (erc-display-error-notice
          nil (format "Unknown or unsupported SASL mechanism: `%s'" mech))
         (error "Unknown or unsupported SASL mechanism: `%s'" mech))
       (setf (erc-sasl--state-client erc-sasl--state) client))))
  ((kill-local-variable 'erc-sasl--state)
   (kill-local-variable 'erc-sasl--options))
  'local)