Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NickServ identification: Prompt for password last, overall simplifications #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 25, 2021

  1. NickServ identification: Prompt for password last, overall simplifica…

    …tions
    
    When `erc-prompt-for-nickserv-password' is true, don't ignore the
    other forms of identification.  Instead, process them first, and
    prompt for the password last.  Separate concerns (determination of the
    nick to use, of the password to use, and actual message sending).
    
    Note that the user can be interactively prompted for a password on
    reception of a Nickserv request, as before (on
    `erc-prompt-for-nickserv-password').
    
    * lisp/erc/erc-services.el (erc-nickserv-identify): Don't take the
    password anymore as an argument (and don't prompt for it
    interactively).  On the contrary, now take the nick to use for
    identification (interactively, ask for it, defaulting to the current
    one).  Move actual message sending into the new
    `erc-nickserv-send-identify', and password prompting into
    `erc-nickserv-get-password'.
    
    (erc-nickserv-send-identify): New function containing the sending
    code, given the nick and password.
    
    (erc-nickserv-get-password): Try each password source in turn, in this
    order: `erc-nickserv-passwords', auth-source (if
    `erc-use-auth-source-for-nickserv-password' is true), and in the end
    prompt the user interactively (if `erc-prompt-for-nickserv-password'
    is true).  If one source returns a string, the function returns it, or
    nil if the string is empty.
    
    (erc-nickserv-call-identify-function): Remove.  It was necessary as a
    cumbersome workaround for the fact that the code for password
    prompting was in the `interactive' form of function
    `erc-nickserv-identify' before this change.
    
    (erc-nickserv-identify-autodetect, erc-nickserv-identify-on-connect)
    (erc-nickserv-identify-on-nick-change): Call `erc-nickserv-identify'
    directly (`erc-nickserv-call-identify-function' was removed).  For the
    last two functions, remove the redundant checks on the Nickserv
    identification flags (additionally, it is doubtful they have any
    measurable impact on performance).
    OlCe2 committed Feb 25, 2021
    Configuration menu
    Copy the full SHA
    0b3d0c7 View commit details
    Browse the repository at this point in the history