Files
znc/Chan.cpp
psychon 564226c0ec Attach to channels when joining them
Here's the scenario:
- Client joins #chan, then detaches from #chan (/detach #chan).
- $EVIL_OP kicks us from #chan. Since it's detached, this is not forwarded.
- Client reattaches to #chan (sends us a join for #chan).

What happens is that the client does *not* receive a successful JOIN for the
channel, but TOPIC, MODE and the NAMES reply is forwarded. On proper clients
this would result in weird traffic shown in the server window. On broken clients
like irssi which don't wait for the JOIN reply from the server, this meant that
it looked like a successful JOIN to the client while ZNC still thought the
channel was detached.

This is fixed by automatically attaching to the channel when we join it due to a
client. This means that the channel will always be attached after a JOIN.

Thanks to tomaw for finding this and making me actually understand that this is
a bug in ZNC, not irssi.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2092 726aef4b-f618-498e-8847-2d620e286838
2010-07-24 20:34:26 +00:00

13 KiB