1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 04:30:45 -08:00
emacs/lisp/erc
Olivier Certner c6eb114a42
ERC: NickServ: Prompt for password last, overall simplifications (bug#46777)
When 'erc-prompt-for-nickserv-password' is non-nil, 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): Make the password
argument optional (and don't prompt for it interactively).  Further,
now take the nick to use for identification (interactively, ask for
it, defaulting to the current one).  Move the actual message sending
into the new 'erc-nickserv-send-identify' function, and the password
prompting into 'erc-nickserv-get-password'.

(erc-nickserv-send-identify): New function containing the code for
sending the identify message to NickServ, given the nick and password.

(erc-nickserv-get-password): Try each password source in turn, in the
following order: 'erc-nickserv-passwords', auth-source (if
'erc-use-auth-source-for-nickserv-password' is non-nil), and in the
end prompt the user interactively (if
'erc-prompt-for-nickserv-password' is non-nil).  If one source returns
a string, the function returns it, or nil if the string is empty.

(erc-nickserv-call-identify-function): Declare obsolete, but retain
for backward compatibility.  Prefer invoking 'erc-nickserv-identify'
directly instead.

(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' has been obsoleted).
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).

* etc/NEWS: Announce the change.

Co-authored-by: F. Jason Park <jp@neverwas.me>
2021-09-17 00:31:31 -04:00
..
ChangeLog.1
ChangeLog.2
erc-autoaway.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
erc-backend.el ERC: Use 'string-search' only on Emacs 28 and later 2021-09-12 14:32:12 -04:00
erc-button.el * lisp/erc/erc-button.el (erc-emacswiki-url): Update to shorter address. 2021-09-16 22:45:46 -04:00
erc-capab.el Prefer https and fix broken links in ERC 2021-03-20 10:00:28 +01:00
erc-dcc.el ERC: Use 'string-replace' only on Emacs 28 and later 2021-09-12 14:32:13 -04:00
erc-desktop-notifications.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
erc-ezbounce.el lisp/erc: Use lexical-binding 2021-03-18 23:14:33 -04:00
erc-fill.el * lisp/**/*.el: Avoid positional args to define-minor-mode 2021-04-11 23:47:14 -04:00
erc-goodies.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
erc-ibuffer.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
erc-identd.el lisp/erc: Use lexical-binding 2021-03-18 23:14:33 -04:00
erc-imenu.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
erc-join.el Allow irc network symbols in erc-autojoin-channels-alist 2021-09-16 15:50:14 +02:00
erc-lang.el lisp/erc: Use lexical-binding 2021-03-18 23:14:33 -04:00
erc-list.el lisp/erc: Use lexical-binding 2021-03-18 23:14:33 -04:00
erc-log.el lisp/erc: Use lexical-binding 2021-03-18 23:14:33 -04:00
erc-match.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
erc-menu.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
erc-netsplit.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
erc-networks.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
erc-notify.el lisp/erc: Use lexical-binding 2021-03-18 23:14:33 -04:00
erc-page.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
erc-pcomplete.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
erc-replace.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
erc-ring.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
erc-services.el ERC: NickServ: Prompt for password last, overall simplifications (bug#46777) 2021-09-17 00:31:31 -04:00
erc-sound.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
erc-speedbar.el ERC: Use 'string-search' only on Emacs 28 and later 2021-09-12 14:32:12 -04:00
erc-spelling.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
erc-stamp.el Merge from origin/emacs-27 2021-08-06 08:49:32 -07:00
erc-status-sidebar.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
erc-track.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
erc-truncate.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
erc-xdcc.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
erc.el ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00