diff options
author | John Wiegley <johnw@newartisans.com> | 2015-12-29 21:39:08 -0800 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2015-12-29 21:39:08 -0800 |
commit | ec0a80cc283badc7f7fd5ef78512dde6d34b1355 (patch) | |
tree | 7190e0fb3d4aa06018d8cf997f06b806fb09a9c8 /lisp/erc/erc-join.el | |
parent | d259328fb87db8cc67d52771efcfa653e52c5b71 (diff) | |
parent | e823c34072bf045800d91e12c7ddb61fa23c6e30 (diff) | |
download | emacs-25-merge.tar.gz |
Merge emacs-25 into master (using imerge)emacs-25-merge
Diffstat (limited to 'lisp/erc/erc-join.el')
-rw-r--r-- | lisp/erc/erc-join.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el index 4c99898bc41..c1ce14ab016 100644 --- a/lisp/erc/erc-join.el +++ b/lisp/erc/erc-join.el @@ -156,7 +156,13 @@ This function is run from `erc-nickserv-identified-hook'." (dolist (l erc-autojoin-channels-alist) (when (string-match (car l) server) (dolist (chan (cdr l)) - (erc-server-join-channel server chan))))) + (let ((buffer (erc-get-buffer chan))) + ;; Only auto-join the channels that we aren't already in + ;; using a different nick. + (when (or (not buffer) + (not (with-current-buffer buffer + (erc-server-process-alive)))) + (erc-server-join-channel server chan))))))) ;; Return nil to avoid stomping on any other hook funcs. nil) @@ -170,7 +176,7 @@ This function is run from `erc-nickserv-identified-hook'." (password (if (functionp secret) (funcall secret) secret))) - (erc-server-send (concat "join " channel + (erc-server-send (concat "JOIN " channel (if password (concat " " password) ""))))) |