]> git.eshelyaron.com Git - emacs.git/commitdiff
Autojoin channels with same name on different servers in erc
authorMartin Kletzander <nert.pinx@gmail.com>
Sun, 23 Jun 2019 21:53:02 +0000 (23:53 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 23 Jun 2019 21:53:02 +0000 (23:53 +0200)
* lisp/erc/erc-join.el (erc-autojoin-channels): Join channels with
the same name on different servers (bug#32723).

Copyright-paperwork-exempt: yes

lisp/erc/erc-join.el

index 896521eaf0a7c7d7f2cfc32b24b434db0fa39416..c292fdbd797fafa27e23c94df3ae1a83b05ce20a 100644 (file)
@@ -161,6 +161,10 @@ 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))))))))