Variable: erc-autojoin-channels-alist
erc-autojoin-channels-alist is a customizable variable defined in
erc-join.el.gz.
Value
nil
Documentation
Alist of channels to autojoin on IRC networks.
Every element in the alist has the form (SERVER . CHANNELS).
SERVER is a regexp matching the server, and channels is the list
of channels to join. SERVER can also be a symbol, in which case
it's matched against a non-nil :id passed to erc or erc-tls
when connecting or the value of the current erc-network(var)/erc-network(fun) instead of
erc-server-announced-name or erc-session-server (this can be
useful when connecting to an IRC proxy that relays several
networks under the same server).
Note that for historical reasons, this option is mutated at runtime,
which is regrettable but here to stay. Please double check the value
before saving it to a custom-file(var)/custom-file(fun).
If the channel(s) require channel keys for joining, the passwords are found via auth-source. For instance, if you use ~/.authinfo as your auth-source backend, then put something like the following in that file:
machine irc.example.net login "#fsf" password sEcReT
Customize this variable to set the value for your first connect. Once you are connected and join and part channels, this alist keeps track of what channels you are on, and will join them again when you get disconnected. When you restart Emacs, however, those changes are lost, and the customization you saved the last time is used again.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-join.el.gz
(defcustom erc-autojoin-channels-alist nil
"Alist of channels to autojoin on IRC networks.
Every element in the alist has the form (SERVER . CHANNELS).
SERVER is a regexp matching the server, and channels is the list
of channels to join. SERVER can also be a symbol, in which case
it's matched against a non-nil `:id' passed to `erc' or `erc-tls'
when connecting or the value of the current `erc-network' instead of
`erc-server-announced-name' or `erc-session-server' (this can be
useful when connecting to an IRC proxy that relays several
networks under the same server).
Note that for historical reasons, this option is mutated at runtime,
which is regrettable but here to stay. Please double check the value
before saving it to a `custom-file'.
If the channel(s) require channel keys for joining, the passwords
are found via auth-source. For instance, if you use ~/.authinfo
as your auth-source backend, then put something like the
following in that file:
machine irc.example.net login \"#fsf\" password sEcReT
Customize this variable to set the value for your first connect.
Once you are connected and join and part channels, this alist
keeps track of what channels you are on, and will join them
again when you get disconnected. When you restart Emacs, however,
those changes are lost, and the customization you saved the last
time is used again."
:type '(alist :options (Libera.Chat)
:key-type (choice :tag "Server"
(symbol :tag "Network")
(regexp :tag "Host or domain"))
:value-type (repeat :tag "Channels" (string :tag "Name"))))