summaryrefslogtreecommitdiff
path: root/lisp/erc/erc-services.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/erc/erc-services.el')
-rw-r--r--lisp/erc/erc-services.el69
1 files changed, 37 insertions, 32 deletions
diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el
index 9ef8b7f46ab..61006e0c028 100644
--- a/lisp/erc/erc-services.el
+++ b/lisp/erc/erc-services.el
@@ -30,10 +30,10 @@
;; are made to test if NickServ is the real NickServ for a given network or
;; server.
-;; As a default, ERC has the data for the official nickname services on
-;; the networks Austnet, BrasNET, Dalnet, freenode, GalaxyNet, GRnet,
-;; and Slashnet. You can add more by using M-x customize-variable RET
-;; erc-nickserv-alist.
+;; As a default, ERC has the data for the official nickname services
+;; on the networks Austnet, BrasNET, Dalnet, freenode, GalaxyNet,
+;; GRnet, Libera.Chat, and Slashnet. You can add more by using
+;; M-x customize-variable RET erc-nickserv-alist.
;; Usage:
;;
@@ -43,9 +43,10 @@
;; (erc-services-mode 1)
;;
;; Add your nickname and NickServ password to `erc-nickserv-passwords'.
-;; Using the freenode network as an example:
+;; Using the Libera.Chat network as an example:
;;
-;; (setq erc-nickserv-passwords '((freenode (("nickname" "password")))))
+;; (setq erc-nickserv-passwords
+;; '((Libera.Chat (("nickname" "password")))))
;;
;; The default automatic identification mode is autodetection of NickServ
;; identify requests. Set the variable `erc-nickserv-identify-mode' if
@@ -91,7 +92,6 @@ Possible settings are:.
nil - Disables automatic Nickserv identification.
You can also use \\[erc-nickserv-identify-mode] to change modes."
- :group 'erc-services
:type '(choice (const autodetect)
(const nick-change)
(const both)
@@ -107,13 +107,13 @@ You can also use \\[erc-nickserv-identify-mode] to change modes."
"This mode automates communication with services."
((erc-nickserv-identify-mode erc-nickserv-identify-mode))
((remove-hook 'erc-server-NOTICE-functions
- 'erc-nickserv-identify-autodetect)
+ #'erc-nickserv-identify-autodetect)
(remove-hook 'erc-after-connect
- 'erc-nickserv-identify-on-connect)
+ #'erc-nickserv-identify-on-connect)
(remove-hook 'erc-nick-changed-functions
- 'erc-nickserv-identify-on-nick-change)
+ #'erc-nickserv-identify-on-nick-change)
(remove-hook 'erc-server-NOTICE-functions
- 'erc-nickserv-identification-autodetect)))
+ #'erc-nickserv-identification-autodetect)))
;;;###autoload
(defun erc-nickserv-identify-mode (mode)
@@ -123,7 +123,7 @@ You can also use \\[erc-nickserv-identify-mode] to change modes."
"Choose Nickserv identify mode (RET to disable): "
'(("autodetect") ("nick-change") ("both")) nil t))))
(add-hook 'erc-server-NOTICE-functions
- 'erc-nickserv-identification-autodetect)
+ #'erc-nickserv-identification-autodetect)
(unless erc-networks-mode
;; Force-enable networks module, because we need it to set
;; erc-network for us.
@@ -131,41 +131,40 @@ You can also use \\[erc-nickserv-identify-mode] to change modes."
(cond ((eq mode 'autodetect)
(setq erc-nickserv-identify-mode 'autodetect)
(add-hook 'erc-server-NOTICE-functions
- 'erc-nickserv-identify-autodetect)
+ #'erc-nickserv-identify-autodetect)
(remove-hook 'erc-nick-changed-functions
- 'erc-nickserv-identify-on-nick-change)
+ #'erc-nickserv-identify-on-nick-change)
(remove-hook 'erc-after-connect
- 'erc-nickserv-identify-on-connect))
+ #'erc-nickserv-identify-on-connect))
((eq mode 'nick-change)
(setq erc-nickserv-identify-mode 'nick-change)
(add-hook 'erc-after-connect
- 'erc-nickserv-identify-on-connect)
+ #'erc-nickserv-identify-on-connect)
(add-hook 'erc-nick-changed-functions
- 'erc-nickserv-identify-on-nick-change)
+ #'erc-nickserv-identify-on-nick-change)
(remove-hook 'erc-server-NOTICE-functions
- 'erc-nickserv-identify-autodetect))
+ #'erc-nickserv-identify-autodetect))
((eq mode 'both)
(setq erc-nickserv-identify-mode 'both)
(add-hook 'erc-server-NOTICE-functions
- 'erc-nickserv-identify-autodetect)
+ #'erc-nickserv-identify-autodetect)
(add-hook 'erc-after-connect
- 'erc-nickserv-identify-on-connect)
+ #'erc-nickserv-identify-on-connect)
(add-hook 'erc-nick-changed-functions
- 'erc-nickserv-identify-on-nick-change))
+ #'erc-nickserv-identify-on-nick-change))
(t
(setq erc-nickserv-identify-mode nil)
(remove-hook 'erc-server-NOTICE-functions
- 'erc-nickserv-identify-autodetect)
+ #'erc-nickserv-identify-autodetect)
(remove-hook 'erc-after-connect
- 'erc-nickserv-identify-on-connect)
+ #'erc-nickserv-identify-on-connect)
(remove-hook 'erc-nick-changed-functions
- 'erc-nickserv-identify-on-nick-change)
+ #'erc-nickserv-identify-on-nick-change)
(remove-hook 'erc-server-NOTICE-functions
- 'erc-nickserv-identification-autodetect))))
+ #'erc-nickserv-identification-autodetect))))
(defcustom erc-prompt-for-nickserv-password t
"Ask for the password when identifying to NickServ."
- :group 'erc-services
:type 'boolean)
(defcustom erc-use-auth-source-for-nickserv-password nil
@@ -174,7 +173,6 @@ This option has an no effect if `erc-prompt-for-nickserv-password'
is non-nil, and passwords from `erc-nickserv-passwords' take
precedence."
:version "28.1"
- :group 'erc-services
:type 'boolean)
(defcustom erc-nickserv-passwords nil
@@ -184,10 +182,9 @@ passwords to be used.
Example of use:
(setq erc-nickserv-passwords
- \\='((freenode ((\"nick-one\" . \"password\")
- (\"nick-two\" . \"password\")))
+ \\='((Libera.Chat ((\"nick-one\" . \"password\")
+ (\"nick-two\" . \"password\")))
(DALnet ((\"nick\" . \"password\")))))"
- :group 'erc-services
:type '(repeat
(list :tag "Network"
(choice :tag "Network name"
@@ -201,6 +198,7 @@ Example of use:
(const GalaxyNet)
(const GRnet)
(const iip)
+ (const Libera.Chat)
(const OFTC)
(const QuakeNet)
(const Rizon)
@@ -268,6 +266,15 @@ Example of use:
"type\\s-/squery\\s-Trent\\s-identify\\s-<password>"
"Trent@anon.iip"
"IDENTIFY" nil "SQUERY" nil)
+ (Libera.Chat
+ "NickServ!NickServ@services.libera.chat"
+ ;; Libera.Chat also accepts a password at login, see the `erc'
+ ;; :password argument.
+ "This\\s-nickname\\s-is\\s-registered.\\s-Please\\s-choose"
+ "NickServ"
+ "IDENTIFY" nil nil
+ ;; See also the 901 response code message.
+ "You\\s-are\\s-now\\s-identified\\s-for\\s-")
(OFTC
"NickServ!services@services.oftc.net"
;; OFTC's NickServ doesn't ask you to identify anymore.
@@ -305,7 +312,6 @@ 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."
- :group 'erc-services
:type '(repeat
(list :tag "Nickserv data"
(symbol :tag "Network name")
@@ -357,7 +363,6 @@ The last two elements are optional."
(defcustom erc-nickserv-identified-hook nil
"Run this hook when NickServ acknowledged successful identification.
Hooks are called with arguments (NETWORK NICK)."
- :group 'erc-services
:type 'hook)
(defun erc-nickserv-identification-autodetect (_proc parsed)