goshuirc / bnc

a simple irc bouncer written in go
https://goshubnc.org/
MIT License
17 stars 3 forks source link

Don't pass through JOIN commands if client's already joined to those channels #6

Open DanielOaks opened 7 years ago

DanielOaks commented 7 years ago

This is a bit silly. We should prevent these requests if the given ServerConnection is already joined to that channel.

prawnsalad commented 7 years ago

Is this silly? Feels like it would be safer to let them pass through as it would do no harm. There may be some edge case in which the client isn't connected and this ensures that it is.

DanielOaks commented 7 years ago

Hmm... yeah I can see what you mean.

Not directly related to this, but one thing I have an issue when I use ZNC is that IRC clients constantly rejoin channels that I try to part once I've exited them. Pretty much all clients remember all joined channels by default, and will "helpfully" try to join every single one of them again. Means if I try to leave a channel I can, but when I connect with a different client it makes me join the channel again. If/when we close this, I'll make an issue for a "disabled channels" module/command or similar, and we'll work out how to best do that.