diff options
Diffstat (limited to 'lisp/erc/erc-networks.el')
-rw-r--r-- | lisp/erc/erc-networks.el | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el index 9926255e3aa..54502b2df05 100644 --- a/lisp/erc/erc-networks.el +++ b/lisp/erc/erc-networks.el @@ -1,4 +1,4 @@ -;;; erc-networks.el --- IRC networks +;;; erc-networks.el --- IRC networks -*- lexical-binding: t; -*- ;; Copyright (C) 2002, 2004-2021 Free Software Foundation, Inc. @@ -290,6 +290,13 @@ ("LagNet: Random server" LagNet "irc.lagnet.org.za" 6667) ("LagNet: AF, ZA, Cape Town" LagNet "reaper.lagnet.org.za" 6667) ("LagNet: AF, ZA, Johannesburg" LagNet "mystery.lagnet.org.za" 6667) + ("Libera.Chat: Random server" Libera.Chat "irc.libera.chat" 6667) + ("Libera.Chat: Random Europe server" Libera.Chat "irc.eu.libera.chat" 6667) + ("Libera.Chat: Random US & Canada server" Libera.Chat "irc.us.libera.chat" 6667) + ("Libera.Chat: Random Australia & New Zealand server" Libera.Chat "irc.au.libera.chat" 6667) + ("Libera.Chat: Random East Asia server" Libera.Chat "irc.ea.libera.chat" 6667) + ("Libera.Chat: IPv4 only server" Libera.Chat "irc.ipv4.libera.chat" 6667) + ("Libera.Chat: IPv6 only server" Libera.Chat "irc.ipv6.libera.chat" 6667) ("Librenet: Random server" Librenet "irc.librenet.net" 6667) ("LinkNet: Random server" LinkNet "irc.link-net.org" ((6667 6669))) ("LinuxChix: Random server" LinuxChix "irc.linuxchix.org" 6667) @@ -443,7 +450,6 @@ NET is a symbol indicating to which network from `erc-networks-alist' this server corresponds, HOST is the servers hostname and PORTS is either a number, a list of numbers, or a list of port ranges." - :group 'erc-networks :type '(alist :key-type (string :tag "Name") :value-type (group symbol (string :tag "Hostname") @@ -595,6 +601,7 @@ PORTS is either a number, a list of numbers, or a list of port ranges." (Krono "krono.net") (Krushnet "krushnet.org") (LagNet "lagnet.org.za") + (Libera.Chat "libera.chat") (Librenet "librenet.net") (LinkNet "link-net.org") (LinuxChix "cats\\.meow\\.at\\|linuxchix\\.org") @@ -714,7 +721,6 @@ MATCHER is used to find a corresponding network to a server while connected to it. If it is regexp, it's used to match against `erc-server-announced-name'. It can also be a function (predicate). Then it is executed with the server buffer as current-buffer." - :group 'erc-networks :type '(repeat (list :tag "Network" (symbol :tag "Network name") @@ -762,25 +768,25 @@ Return the name of this server's network as a symbol." "Return the name of the current network as a string." (erc-with-server-buffer (symbol-name erc-network))) -(defun erc-set-network-name (proc parsed) +(defun erc-set-network-name (_proc _parsed) "Set `erc-network' to the value returned by `erc-determine-network'." (unless erc-server-connected (setq erc-network (erc-determine-network))) nil) -(defun erc-unset-network-name (nick ip reason) +(defun erc-unset-network-name (_nick _ip _reason) "Set `erc-network' to nil." (setq erc-network nil) nil) (define-erc-module networks nil "Provide data about IRC networks." - ((add-hook 'erc-server-375-functions 'erc-set-network-name) - (add-hook 'erc-server-422-functions 'erc-set-network-name) - (add-hook 'erc-disconnected-hook 'erc-unset-network-name)) - ((remove-hook 'erc-server-375-functions 'erc-set-network-name) - (remove-hook 'erc-server-422-functions 'erc-set-network-name) - (remove-hook 'erc-disconnected-hook 'erc-unset-network-name))) + ((add-hook 'erc-server-375-functions #'erc-set-network-name) + (add-hook 'erc-server-422-functions #'erc-set-network-name) + (add-hook 'erc-disconnected-hook #'erc-unset-network-name)) + ((remove-hook 'erc-server-375-functions #'erc-set-network-name) + (remove-hook 'erc-server-422-functions #'erc-set-network-name) + (remove-hook 'erc-disconnected-hook #'erc-unset-network-name))) (defun erc-ports-list (ports) "Return a list of PORTS. @@ -835,8 +841,8 @@ As an example: ;; think it is worth the effort. (defvar erc-settings - '((pals freenode ("kensanata" "shapr" "anti\\(fuchs\\|gone\\)")) - (format-nick-function (freenode "#emacs") erc-format-@nick)) + '((pals Libera.Chat ("kensanata" "shapr" "anti\\(fuchs\\|gone\\)")) + (format-nick-function (Libera.Chat "#emacs") erc-format-@nick)) "Experimental: Alist of configuration options. The format is (VARNAME SCOPE VALUE) where VARNAME is a symbol identifying the configuration option, @@ -865,7 +871,7 @@ VALUE is the options value.") items nil))))) val)) -(erc-get 'pals 'freenode) +(erc-get 'pals 'Libera.Chat) (provide 'erc-networks) |