all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#32723: [PATCH] Fix erc-autojoin for same channel names on multiple servers
@ 2018-09-12 15:44 Martin Kletzander
  2019-06-23 21:53 ` Lars Ingebrigtsen
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Martin Kletzander @ 2018-09-12 15:44 UTC (permalink / raw)
  To: 32723

When auto-joining channel with the same name on
multiple channels the auto-join will go over the
list of channels and for each one it checks if
there is a buffer and alive server process.
However it does not check if the server process
matches the server being currently processed for
auto-joining.

This happens since commit "Don't join erc channels
doubly"

Fix it by checking if the currently processed
server matches the erc process name of the already
joined channel.

* lisp/erc/erc-join.el (erc-autojoin-channels):
Join channels with the same name on different
servers.

Copyright-paperwork-exempt: yes
---
 lisp/erc/erc-join.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el
index a6bf6518ea86..567a4cc27e19 100644
--- a/lisp/erc/erc-join.el
+++ b/lisp/erc/erc-join.el
@@ -161,6 +161,9 @@ This function is run from `erc-nickserv-identified-hook'."
 	      ;; Only auto-join the channels that we aren't already in
 	      ;; using a different nick.
 	      (when (or (not buffer)
+			;; If the same channel is joined on another
+			;; server the best-effort is to just join
+			(not (string-match (car l) (process-name erc-server-process)))
 			(not (with-current-buffer buffer
 			       (erc-server-process-alive))))
 		(erc-server-join-channel server chan))))))))
-- 
2.18.0






^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-06-09 14:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-12 15:44 bug#32723: [PATCH] Fix erc-autojoin for same channel names on multiple servers Martin Kletzander
2019-06-23 21:53 ` Lars Ingebrigtsen
2020-05-10 19:45 ` Kevin Brubeck Unhammer
     [not found] ` <87ftc7h9gp.fsf@fsfe.org>
2020-05-11 15:06   ` Martin Kletzander
2020-05-19 18:25     ` Martin Kletzander
2020-05-19 18:40       ` Kevin Brubeck Unhammer
2020-05-19 20:32         ` Corwin Brust
2020-06-09 14:52           ` Martin Kletzander

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.