From 5c3b4838df7741dcfeb90eb914e7a5bba379441b Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Sun, 7 Apr 2024 19:28:24 -0700 Subject: [PATCH 1/2] ; * lisp/erc/erc-services.el (erc-nickserv-alist): Doc. --- lisp/erc/erc-services.el | 50 ++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 92cb9075b5e..0881006ed77 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -22,6 +22,13 @@ ;;; Commentary: +;; As of ERC 5.6, this library's main module, `services', mainly +;; concerns itself with authenticating to legacy IRC servers. If your +;; server supports SASL or CERTFP, please use one of those instead. +;; See (info "(erc) client-certificate") and (info "(erc) SASL") for +;; details. Note that this library also contains the local module +;; `services-regain' as well as standalone utility functions. + ;; There are two ways to go about identifying yourself automatically to ;; NickServ with this module. The more secure way is to listen for identify ;; requests from the user NickServ. Another way is to identify yourself to @@ -37,10 +44,7 @@ ;; Usage: ;; -;; Put into your .emacs: -;; -;; (require 'erc-services) -;; (erc-services-mode 1) +;; Customize the option `erc-modules' to include `services'. ;; ;; Add your nickname and NickServ password to `erc-nickserv-passwords'. ;; Using the Libera.Chat network as an example: @@ -50,10 +54,7 @@ ;; ;; The default automatic identification mode is autodetection of NickServ ;; identify requests. Set the variable `erc-nickserv-identify-mode' if -;; you'd like to change this behavior. You can also change the way -;; automatic identification is handled by using: -;; -;; M-x erc-nickserv-identify-mode +;; you'd like to change this behavior. ;; ;; If you'd rather not identify yourself automatically but would like access ;; to the functions contained in this file, just load this file without @@ -309,21 +310,26 @@ erc-nickserv-alist "/msg\\s-NickServ\\s-IDENTIFY\\s-\^_password" "NickServ@services.slashnet.org" "IDENTIFY" nil nil nil)) - "Alist of NickServer details, sorted by network. + "Alist of NickServer details, sorted by network. Every element in the list has the form - (SYMBOL NICKSERV REGEXP NICK KEYWORD USE-CURRENT ANSWER SUCCESS-REGEXP) - -SYMBOL is a network identifier, a symbol, as used in `erc-networks-alist'. -NICKSERV is the description of the nickserv in the form nick!user@host. -REGEXP is a regular expression matching the message from nickserv. -NICK is nickserv's nickname. Use nick@server where necessary/possible. -KEYWORD is the keyword to use in the reply message to identify yourself. -USE-CURRENT indicates whether the current nickname must be used when - identifying. -ANSWER is the command to use for the answer. The default is `privmsg'. -SUCCESS-REGEXP is a regular expression matching the message nickserv - sends when you've successfully identified. -The last two elements are optional." + (NETWORK SENDER INSTRUCT-RX NICK SUBCMD YOUR-NICK-P ANSWER SUCCESS-RX) + +NETWORK is a network identifier, a symbol, as used in `erc-networks-alist'. +SENDER is the exact nick!user@host \"source\" for \"NOTICE\" messages +indicating success or requesting that the user identify. +INSTRUCT-RX is a regular expression matching a \"NOTICE\" from the + services bot instructing the user to identify. It must be non-null + when the option `erc-nickserv-identify-mode' is set to `autodetect'. + When it's `both', and this field is non-null, ERC will forgo + identifying on nick changes and after connecting. +NICK is the nickname of the services bot to use when issuing commands. +SUBCMD is the bot command for identifying, typically \"IDENTIFY\". +YOUR-NICK-P indicates whether to send the user's current nickname before + their password when identifying. +ANSWER is the command to use for the answer. The default is \"PRIVMSG\". +SUCCESS-RX is a regular expression matching the message NickServ sends + when you've successfully identified. +The last two elements are optional, as are others, where implied." :type '(repeat (list :tag "Nickserv data" (symbol :tag "Network name") -- 2.44.0