2021-03-18 23:14:33 -04:00
|
|
|
;;; erc-join.el --- autojoin channels on connect and reconnects -*- lexical-binding: t; -*-
|
2006-01-29 13:08:58 +00:00
|
|
|
|
2021-01-01 01:13:56 -08:00
|
|
|
;; Copyright (C) 2002-2004, 2006-2021 Free Software Foundation, Inc.
|
2006-01-29 13:08:58 +00:00
|
|
|
|
|
|
|
;; Author: Alex Schroeder <alex@gnu.org>
|
2020-03-18 21:27:49 -04:00
|
|
|
;; Maintainer: Amin Bandali <bandali@gnu.org>
|
2021-02-10 20:58:16 +01:00
|
|
|
;; Keywords: comm, irc
|
Update ERC module URLs
* lisp/erc/erc-autoaway.el, lisp/erc/erc-button.el,
lisp/erc/erc-compat.el, lisp/erc/erc-fill.el, lisp/erc/erc-imenu.el,
lisp/erc/erc-join.el, lisp/erc/erc-lang.el, lisp/erc/erc-match.el,
lisp/erc/erc-pcomplete.el, lisp/erc/erc-ring.el,
lisp/erc/erc-spelling.el, lisp/erc/erc-stamp.el,
lisp/erc/erc-track.el: Update URL to friendlier form, over https.
* lisp/erc/erc-ibuffer.el: Remove URL to nonexistent page.
* lisp/erc/erc-list.el, lisp/erc/erc-log.el, lisp/erc/erc-notify.el,
lisp/erc/erc-replace.el, lisp/erc/erc-services.el,
lisp/erc/erc-sound.el, lisp/erc/erc-speedbar.el,
lisp/erc/erc-truncate.el: Add URL to corresponding EmacsWiki page.
2020-01-24 01:09:43 -05:00
|
|
|
;; URL: https://www.emacswiki.org/emacs/ErcAutoJoin
|
2006-01-29 13:08:58 +00:00
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
2008-05-06 03:36:21 +00:00
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
2006-01-29 13:08:58 +00:00
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 03:36:21 +00:00
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
2006-01-29 13:08:58 +00:00
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2017-09-13 15:52:52 -07:00
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
2006-01-29 13:08:58 +00:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
;; This allows us to customize an `erc-autojoin-channels-alist'. As
|
|
|
|
;; we /JOIN and /PART channels, this alist is updated to reflect our
|
|
|
|
;; current setup, so that when we reconnect, we rejoin the same
|
|
|
|
;; channels. The alist can be customized, so that the customized
|
|
|
|
;; value will be used when we reconnect in our next Emacs session.
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(require 'erc)
|
2012-04-10 06:43:35 +02:00
|
|
|
(require 'auth-source)
|
2021-09-16 15:48:28 +02:00
|
|
|
(require 'erc-networks)
|
2006-01-29 13:08:58 +00:00
|
|
|
|
|
|
|
(defgroup erc-autojoin nil
|
|
|
|
"Enable autojoining."
|
|
|
|
:group 'erc)
|
|
|
|
|
Put most erc autoloads in a dedicated file erc-loaddefs.el
These are features that are only useful after erc.el is loaded.
* lisp/erc/erc.el (top-level): Load erc-loaddefs.
* lisp/erc/erc-autoaway.el, lisp/erc/erc-button.el:
* lisp/erc/erc-capab.el, lisp/erc/erc-compat.el:
* lisp/erc/erc-dcc.el, lisp/erc/erc-desktop-notifications.el:
* lisp/erc/erc-ezbounce.el, lisp/erc/erc-fill.el:
* lisp/erc/erc-identd.el, lisp/erc/erc-imenu.el:
* lisp/erc/erc-join.el, lisp/erc/erc-list.el, lisp/erc/erc-log.el:
* lisp/erc/erc-match.el, lisp/erc/erc-menu.el:
* lisp/erc/erc-netsplit.el, lisp/erc/erc-notify.el:
* lisp/erc/erc-page.el, lisp/erc/erc-pcomplete.el:
* lisp/erc/erc-replace.el, lisp/erc/erc-ring.el:
* lisp/erc/erc-services.el, lisp/erc/erc-sound.el:
* lisp/erc/erc-speedbar.el, lisp/erc/erc-spelling.el:
* lisp/erc/erc-stamp.el, lisp/erc/erc-track.el:
* lisp/erc/erc-truncate.el, lisp/erc/erc-xdcc.el:
Set generated-autoload-file to "erc-loaddefs.el".
2017-11-28 21:16:02 -05:00
|
|
|
;;;###autoload(autoload 'erc-autojoin-mode "erc-join" nil t)
|
2006-01-29 13:08:58 +00:00
|
|
|
(define-erc-module autojoin nil
|
|
|
|
"Makes ERC autojoin on connects and reconnects."
|
2021-03-18 23:14:33 -04:00
|
|
|
((add-hook 'erc-after-connect #'erc-autojoin-channels)
|
|
|
|
(add-hook 'erc-nickserv-identified-hook #'erc-autojoin-after-ident)
|
|
|
|
(add-hook 'erc-server-JOIN-functions #'erc-autojoin-add)
|
|
|
|
(add-hook 'erc-server-PART-functions #'erc-autojoin-remove))
|
|
|
|
((remove-hook 'erc-after-connect #'erc-autojoin-channels)
|
|
|
|
(remove-hook 'erc-nickserv-identified-hook #'erc-autojoin-after-ident)
|
|
|
|
(remove-hook 'erc-server-JOIN-functions #'erc-autojoin-add)
|
|
|
|
(remove-hook 'erc-server-PART-functions #'erc-autojoin-remove)))
|
2006-01-29 13:08:58 +00:00
|
|
|
|
|
|
|
(defcustom erc-autojoin-channels-alist nil
|
|
|
|
"Alist of channels to autojoin on IRC networks.
|
|
|
|
Every element in the alist has the form (SERVER . CHANNELS).
|
2021-09-16 15:48:28 +02:00
|
|
|
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 is matched against the value of `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).
|
2006-01-29 13:08:58 +00:00
|
|
|
|
2012-04-10 06:43:35 +02:00
|
|
|
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
|
|
|
|
|
2006-01-29 13:08:58 +00:00
|
|
|
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 '(repeat (cons :tag "Server"
|
|
|
|
(regexp :tag "Name")
|
|
|
|
(repeat :tag "Channels"
|
|
|
|
(string :tag "Name")))))
|
|
|
|
|
2010-08-14 18:58:10 -04:00
|
|
|
(defcustom erc-autojoin-timing 'connect
|
|
|
|
"When ERC should attempt to autojoin a channel.
|
|
|
|
If the value is `connect', autojoin immediately on connecting.
|
|
|
|
If the value is `ident', autojoin after successful NickServ
|
|
|
|
identification, or after `erc-autojoin-delay' seconds.
|
|
|
|
Any other value means the same as `connect'."
|
2014-11-10 05:38:11 -05:00
|
|
|
:version "24.1"
|
2012-08-21 20:45:51 -07:00
|
|
|
:type '(choice (const :tag "On Connection" connect)
|
|
|
|
(const :tag "When Identified" ident)))
|
2010-08-14 18:58:10 -04:00
|
|
|
|
|
|
|
(defcustom erc-autojoin-delay 30
|
|
|
|
"Number of seconds to wait before attempting to autojoin channels.
|
|
|
|
This only takes effect if `erc-autojoin-timing' is `ident'.
|
|
|
|
If NickServ identification occurs before this delay expires, ERC
|
|
|
|
autojoins immediately at that time."
|
2014-11-10 05:38:11 -05:00
|
|
|
:version "24.1"
|
2010-08-14 18:58:10 -04:00
|
|
|
:type 'integer)
|
|
|
|
|
2006-01-29 13:08:58 +00:00
|
|
|
(defcustom erc-autojoin-domain-only t
|
|
|
|
"Truncate host name to the domain name when joining a server.
|
|
|
|
If non-nil, and a channel on the server a.b.c is joined, then
|
|
|
|
only b.c is used as the server for `erc-autojoin-channels-alist'.
|
|
|
|
This is important for networks that redirect you to other
|
|
|
|
servers, presumably in the same domain."
|
|
|
|
:type 'boolean)
|
|
|
|
|
Prefer defvar-local in erc
* lisp/erc/erc-backend.el (erc-server-current-nick)
(erc-server-process, erc-session-server, erc-session-connector)
(erc-session-port, erc-server-announced-name)
(erc-server-version, erc-server-parameters)
(erc-server-connected, erc-server-reconnect-count)
(erc-server-quitting, erc-server-reconnecting)
(erc-server-timed-out, erc-server-banned)
(erc-server-error-occurred, erc-server-lines-sent)
(erc-server-last-peers, erc-server-last-sent-time)
(erc-server-last-ping-time, erc-server-last-received-time)
(erc-server-lag, erc-server-filter-data, erc-server-duplicates)
(erc-server-processing-p, erc-server-flood-last-message)
(erc-server-flood-queue, erc-server-flood-timer)
(erc-server-ping-handler):
* lisp/erc/erc-capab.el (erc-capab-identify-activated)
(erc-capab-identify-sent):
* lisp/erc/erc-dcc.el (erc-dcc-byte-count, erc-dcc-entry-data)
(erc-dcc-file-name):
* lisp/erc/erc-ezbounce.el (erc-ezb-session-list):
* lisp/erc/erc-join.el (erc--autojoin-timer):
* lisp/erc/erc-netsplit.el (erc-netsplit-list):
* lisp/erc/erc-networks.el (erc-network):
* lisp/erc/erc-notify.el (erc-last-ison, erc-last-ison-time):
* lisp/erc/erc-ring.el (erc-input-ring, erc-input-ring-index):
* lisp/erc/erc-stamp.el (erc-timestamp-last-inserted)
(erc-timestamp-last-inserted-left)
(erc-timestamp-last-inserted-right):
* lisp/erc/erc.el (erc-session-password, erc-channel-users)
(erc-server-users, erc-channel-topic, erc-channel-modes)
(erc-insert-marker, erc-input-marker, erc-last-saved-position)
(erc-dbuf, erc-active-buffer, erc-default-recipients)
(erc-session-user-full-name, erc-channel-user-limit)
(erc-channel-key, erc-invitation, erc-channel-list)
(erc-bad-nick, erc-logged-in, erc-default-nicks)
(erc-nick-change-attempt-count, erc-send-input-line-function)
(erc-channel-new-member-names, erc-channel-banlist)
(erc-current-message-catalog): Prefer defvar-local.
2021-01-31 03:19:41 +01:00
|
|
|
(defvar-local erc--autojoin-timer nil)
|
2010-08-14 18:58:10 -04:00
|
|
|
|
|
|
|
(defun erc-autojoin-channels-delayed (server nick buffer)
|
|
|
|
"Attempt to autojoin channels.
|
|
|
|
This is called from a timer set up by `erc-autojoin-channels'."
|
|
|
|
(if erc--autojoin-timer
|
|
|
|
(setq erc--autojoin-timer
|
2020-08-02 07:55:02 +02:00
|
|
|
(cancel-timer erc--autojoin-timer)))
|
2010-08-14 18:58:10 -04:00
|
|
|
(with-current-buffer buffer
|
|
|
|
;; Don't kick of another delayed autojoin or try to wait for
|
|
|
|
;; another ident response:
|
|
|
|
(let ((erc-autojoin-delay -1)
|
|
|
|
(erc-autojoin-timing 'connect))
|
|
|
|
(erc-log "Delayed autojoin started (no ident success detected yet)")
|
|
|
|
(erc-autojoin-channels server nick))))
|
|
|
|
|
2021-09-16 15:48:28 +02:00
|
|
|
(defun erc-autojoin-server-match (candidate)
|
2021-09-19 12:59:01 +02:00
|
|
|
"Match the current network or server against CANDIDATE.
|
2021-09-16 15:48:28 +02:00
|
|
|
This should be a key from `erc-autojoin-channels-alist'."
|
|
|
|
(or (eq candidate (erc-network))
|
|
|
|
(and (stringp candidate)
|
|
|
|
(string-match-p candidate
|
|
|
|
(or erc-server-announced-name
|
|
|
|
erc-session-server)))))
|
|
|
|
|
2021-03-18 23:14:33 -04:00
|
|
|
(defun erc-autojoin-after-ident (_network _nick)
|
2010-08-14 18:58:10 -04:00
|
|
|
"Autojoin channels in `erc-autojoin-channels-alist'.
|
|
|
|
This function is run from `erc-nickserv-identified-hook'."
|
|
|
|
(if erc--autojoin-timer
|
|
|
|
(setq erc--autojoin-timer
|
2020-08-02 07:55:02 +02:00
|
|
|
(cancel-timer erc--autojoin-timer)))
|
2010-08-14 18:58:10 -04:00
|
|
|
(when (eq erc-autojoin-timing 'ident)
|
2017-01-05 07:11:06 -07:00
|
|
|
(let ((server (or erc-session-server erc-server-announced-name))
|
2010-08-14 18:58:10 -04:00
|
|
|
(joined (mapcar (lambda (buf)
|
|
|
|
(with-current-buffer buf (erc-default-target)))
|
|
|
|
(erc-channel-list erc-server-process))))
|
|
|
|
;; We may already be in these channels, e.g. because the
|
|
|
|
;; autojoin timer went off.
|
|
|
|
(dolist (l erc-autojoin-channels-alist)
|
2021-09-16 15:48:28 +02:00
|
|
|
(when (erc-autojoin-server-match (car l))
|
2010-08-14 18:58:10 -04:00
|
|
|
(dolist (chan (cdr l))
|
|
|
|
(unless (erc-member-ignore-case chan joined)
|
2012-04-10 06:43:35 +02:00
|
|
|
(erc-server-join-channel server chan)))))))
|
2010-08-14 18:58:10 -04:00
|
|
|
nil)
|
|
|
|
|
2006-01-29 13:08:58 +00:00
|
|
|
(defun erc-autojoin-channels (server nick)
|
|
|
|
"Autojoin channels in `erc-autojoin-channels-alist'."
|
2010-08-14 18:58:10 -04:00
|
|
|
(if (eq erc-autojoin-timing 'ident)
|
|
|
|
;; Prepare the delayed autojoin timer, in case ident doesn't
|
|
|
|
;; happen within the allotted time limit:
|
|
|
|
(when (> erc-autojoin-delay 0)
|
|
|
|
(setq erc--autojoin-timer
|
|
|
|
(run-with-timer erc-autojoin-delay nil
|
2021-03-18 23:14:33 -04:00
|
|
|
#'erc-autojoin-channels-delayed
|
2010-08-14 18:58:10 -04:00
|
|
|
server nick (current-buffer))))
|
|
|
|
;; `erc-autojoin-timing' is `connect':
|
Fix erc-reuse-buffers behavior
* lisp/erc/erc.el (erc-generate-new-buffer-name): Fixes behavior 1,
also determines if the '#channel/server' buffer already exists
and will reuse that buffer when joining on the same
server. Additionally when creating a new buffer with
'#channel/serverB', the existing buffer '#channel' on 'severA' will be
renamed to '#channel/serverA' for the sake of consistency (bug#40121).
* lisp/erc/erc-join.el (erc-autojoin-channels): The logic is
simplified ensuring that when autojoining channels specified in
erc-autojoin-channels-alist, if there exists an erc buffer with the
same channel name but a different server, it will create a new buffer
to join the channel. The current logic is very weak that will skip
joining same channel on different servers altogether.
By the definition of erc-reuse-buffers, if non-nil it should create a
new buffer when joining channels with same names on different
servers. The current behavior of erc-reuse-buffers is:
1. when non-nil, it will always reuse the same channel buffer,
resulting in server A's channel gets reconnected to the channel with
the same name of server B.
2. when nil, the buffer-name of the joined channel is
'#channel/server'. However if one tries to '/join #channel' from the
server buffer, it creates a new empty buffer with buffer-name
'#channel', instead of opening the already-joined channel buffer.
2020-08-12 13:09:35 +02:00
|
|
|
(let ((server (or erc-session-server erc-server-announced-name)))
|
|
|
|
(dolist (l erc-autojoin-channels-alist)
|
2021-09-16 15:48:28 +02:00
|
|
|
(when (erc-autojoin-server-match (car l))
|
2017-01-05 07:11:06 -07:00
|
|
|
(dolist (chan (cdr l))
|
Fix erc-reuse-buffers behavior
* lisp/erc/erc.el (erc-generate-new-buffer-name): Fixes behavior 1,
also determines if the '#channel/server' buffer already exists
and will reuse that buffer when joining on the same
server. Additionally when creating a new buffer with
'#channel/serverB', the existing buffer '#channel' on 'severA' will be
renamed to '#channel/serverA' for the sake of consistency (bug#40121).
* lisp/erc/erc-join.el (erc-autojoin-channels): The logic is
simplified ensuring that when autojoining channels specified in
erc-autojoin-channels-alist, if there exists an erc buffer with the
same channel name but a different server, it will create a new buffer
to join the channel. The current logic is very weak that will skip
joining same channel on different servers altogether.
By the definition of erc-reuse-buffers, if non-nil it should create a
new buffer when joining channels with same names on different
servers. The current behavior of erc-reuse-buffers is:
1. when non-nil, it will always reuse the same channel buffer,
resulting in server A's channel gets reconnected to the channel with
the same name of server B.
2. when nil, the buffer-name of the joined channel is
'#channel/server'. However if one tries to '/join #channel' from the
server buffer, it creates a new empty buffer with buffer-name
'#channel', instead of opening the already-joined channel buffer.
2020-08-12 13:09:35 +02:00
|
|
|
(let ((buffer
|
|
|
|
(car (erc-buffer-filter
|
|
|
|
(lambda ()
|
|
|
|
(let ((current (erc-default-target)))
|
|
|
|
(and (stringp current)
|
2021-09-16 15:48:28 +02:00
|
|
|
(erc-autojoin-server-match (car l))
|
Fix erc-reuse-buffers behavior
* lisp/erc/erc.el (erc-generate-new-buffer-name): Fixes behavior 1,
also determines if the '#channel/server' buffer already exists
and will reuse that buffer when joining on the same
server. Additionally when creating a new buffer with
'#channel/serverB', the existing buffer '#channel' on 'severA' will be
renamed to '#channel/serverA' for the sake of consistency (bug#40121).
* lisp/erc/erc-join.el (erc-autojoin-channels): The logic is
simplified ensuring that when autojoining channels specified in
erc-autojoin-channels-alist, if there exists an erc buffer with the
same channel name but a different server, it will create a new buffer
to join the channel. The current logic is very weak that will skip
joining same channel on different servers altogether.
By the definition of erc-reuse-buffers, if non-nil it should create a
new buffer when joining channels with same names on different
servers. The current behavior of erc-reuse-buffers is:
1. when non-nil, it will always reuse the same channel buffer,
resulting in server A's channel gets reconnected to the channel with
the same name of server B.
2. when nil, the buffer-name of the joined channel is
'#channel/server'. However if one tries to '/join #channel' from the
server buffer, it creates a new empty buffer with buffer-name
'#channel', instead of opening the already-joined channel buffer.
2020-08-12 13:09:35 +02:00
|
|
|
(string-equal (erc-downcase chan)
|
|
|
|
(erc-downcase current)))))))))
|
2017-01-05 07:11:06 -07:00
|
|
|
(when (or (not buffer)
|
|
|
|
(not (with-current-buffer buffer
|
|
|
|
(erc-server-process-alive))))
|
|
|
|
(erc-server-join-channel server chan))))))))
|
2010-08-14 18:58:10 -04:00
|
|
|
;; Return nil to avoid stomping on any other hook funcs.
|
|
|
|
nil)
|
2006-01-29 13:08:58 +00:00
|
|
|
|
2021-09-16 15:48:28 +02:00
|
|
|
(defun erc-autojoin-current-server ()
|
|
|
|
"Compute the current server for lookup in `erc-autojoin-channels-alist'.
|
|
|
|
Respects `erc-autojoin-domain-only'."
|
|
|
|
(let ((server (or erc-server-announced-name erc-session-server)))
|
|
|
|
(if (and erc-autojoin-domain-only
|
|
|
|
(string-match "[^.\n]+\\.\\([^.\n]+\\.[^.\n]+\\)$" server))
|
|
|
|
(match-string 1 server)
|
|
|
|
server)))
|
|
|
|
|
2006-01-29 13:08:58 +00:00
|
|
|
(defun erc-autojoin-add (proc parsed)
|
|
|
|
"Add the channel being joined to `erc-autojoin-channels-alist'."
|
|
|
|
(let* ((chnl (erc-response.contents parsed))
|
|
|
|
(nick (car (erc-parse-user (erc-response.sender parsed))))
|
|
|
|
(server (with-current-buffer (process-buffer proc)
|
2021-09-16 15:48:28 +02:00
|
|
|
(erc-autojoin-current-server))))
|
2006-01-29 13:08:58 +00:00
|
|
|
(when (erc-current-nick-p nick)
|
2021-09-16 15:48:28 +02:00
|
|
|
(let ((elem (or (assoc (erc-network) erc-autojoin-channels-alist)
|
|
|
|
(assoc server erc-autojoin-channels-alist))))
|
2006-01-29 13:08:58 +00:00
|
|
|
(if elem
|
|
|
|
(unless (member chnl (cdr elem))
|
|
|
|
(setcdr elem (cons chnl (cdr elem))))
|
2021-09-16 15:48:28 +02:00
|
|
|
;; This always keys on server, not network -- user can
|
|
|
|
;; override by simply adding a network to
|
|
|
|
;; `erc-autojoin-channels-alist'
|
2006-01-29 13:08:58 +00:00
|
|
|
(setq erc-autojoin-channels-alist
|
|
|
|
(cons (list server chnl)
|
|
|
|
erc-autojoin-channels-alist))))))
|
|
|
|
;; We must return nil to tell ERC to continue running the other
|
|
|
|
;; functions.
|
|
|
|
nil)
|
|
|
|
|
|
|
|
;; (erc-parse-user "kensanata!~user@dclient217-162-233-228.hispeed.ch")
|
|
|
|
|
|
|
|
(defun erc-autojoin-remove (proc parsed)
|
|
|
|
"Remove the channel being left from `erc-autojoin-channels-alist'."
|
|
|
|
(let* ((chnl (car (erc-response.command-args parsed)))
|
|
|
|
(nick (car (erc-parse-user (erc-response.sender parsed))))
|
|
|
|
(server (with-current-buffer (process-buffer proc)
|
2021-09-16 15:48:28 +02:00
|
|
|
(erc-autojoin-current-server))))
|
2006-01-29 13:08:58 +00:00
|
|
|
(when (erc-current-nick-p nick)
|
2021-09-16 15:48:28 +02:00
|
|
|
(let ((elem (or (assoc (erc-network) erc-autojoin-channels-alist)
|
|
|
|
(assoc server erc-autojoin-channels-alist))))
|
2006-01-29 13:08:58 +00:00
|
|
|
(when elem
|
|
|
|
(setcdr elem (delete chnl (cdr elem)))
|
|
|
|
(unless (cdr elem)
|
|
|
|
(setq erc-autojoin-channels-alist
|
|
|
|
(delete elem erc-autojoin-channels-alist)))))))
|
|
|
|
;; We must return nil to tell ERC to continue running the other
|
|
|
|
;; functions.
|
|
|
|
nil)
|
|
|
|
|
2006-02-08 02:41:23 +00:00
|
|
|
(provide 'erc-join)
|
2006-01-29 13:08:58 +00:00
|
|
|
|
2006-02-08 02:41:23 +00:00
|
|
|
;;; erc-join.el ends here
|
2006-01-29 13:08:58 +00:00
|
|
|
;;
|
|
|
|
;; Local Variables:
|
Put most erc autoloads in a dedicated file erc-loaddefs.el
These are features that are only useful after erc.el is loaded.
* lisp/erc/erc.el (top-level): Load erc-loaddefs.
* lisp/erc/erc-autoaway.el, lisp/erc/erc-button.el:
* lisp/erc/erc-capab.el, lisp/erc/erc-compat.el:
* lisp/erc/erc-dcc.el, lisp/erc/erc-desktop-notifications.el:
* lisp/erc/erc-ezbounce.el, lisp/erc/erc-fill.el:
* lisp/erc/erc-identd.el, lisp/erc/erc-imenu.el:
* lisp/erc/erc-join.el, lisp/erc/erc-list.el, lisp/erc/erc-log.el:
* lisp/erc/erc-match.el, lisp/erc/erc-menu.el:
* lisp/erc/erc-netsplit.el, lisp/erc/erc-notify.el:
* lisp/erc/erc-page.el, lisp/erc/erc-pcomplete.el:
* lisp/erc/erc-replace.el, lisp/erc/erc-ring.el:
* lisp/erc/erc-services.el, lisp/erc/erc-sound.el:
* lisp/erc/erc-speedbar.el, lisp/erc/erc-spelling.el:
* lisp/erc/erc-stamp.el, lisp/erc/erc-track.el:
* lisp/erc/erc-truncate.el, lisp/erc/erc-xdcc.el:
Set generated-autoload-file to "erc-loaddefs.el".
2017-11-28 21:16:02 -05:00
|
|
|
;; generated-autoload-file: "erc-loaddefs.el"
|
2006-01-29 13:08:58 +00:00
|
|
|
;; End:
|