Subject: bug#20695: 25.0.50; ERC Multiple connections to the same server results in message routing errors

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 27 Dec 2015 19:49:43 +0100

Lars Ingebrigtsen <[email-masked]> writes:

>> 1. On connections beyond the first, the new user is instantly joined
>> to channels
>> the previous users were in.
>
> I can reproduce this bug.

It's because of this:

(defun erc-autojoin-channels (server nick)
  "Autojoin channels in `erc-autojoin-channels-alist'."

[...]

    ;; `erc-autojoin-timing' is `connect':
    (dolist (l erc-autojoin-channels-alist)
      (when (string-match (car l) server)
	(dolist (chan (cdr l))
	  (erc-server-join-channel server chan)))))
  ;; Return nil to avoid stomping on any other hook funcs.
  nil)

This code is meant to autojoin all channels you've previously been in,
but it doesn't check if you're already there using a different ident...

I'm quite unfamiliar with the erc code base, so I'm not quite sure what
the right fix here is.  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no