summaryrefslogtreecommitdiff
path: root/lisp/erc/erc-join.el
diff options
context:
space:
mode:
authorMartin Kletzander <nert.pinx@gmail.com>2019-06-23 23:53:02 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-06-23 23:53:02 +0200
commit63b29f81075a3fdca70348f023d3ebb37a4f2a63 (patch)
tree4e7c7786050cc9c9b60f78c3eda93b2caf53afde /lisp/erc/erc-join.el
parent0b7494414a1a921cdaa399159d30e56e71f99885 (diff)
downloademacs-63b29f81075a3fdca70348f023d3ebb37a4f2a63.tar.gz
Autojoin channels with same name on different servers in erc
* lisp/erc/erc-join.el (erc-autojoin-channels): Join channels with the same name on different servers (bug#32723). Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/erc/erc-join.el')
-rw-r--r--lisp/erc/erc-join.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el
index 896521eaf0a..c292fdbd797 100644
--- a/lisp/erc/erc-join.el
+++ b/lisp/erc/erc-join.el
@@ -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))))))))