Description
Hi,
I have an idea in mind for jbnc but it's not easy to implement, let me explain in detail. Imagine that during the process from when we connect to IRC with jbnc, we go through the PASS, NICK, USER, SASL, 001, 005, MOTD steps; I'll refer to this as the "connection path." Now, imagine with a web IRC client, you're in your browser and you connect to IRC, but you close the browser before reaching the raw 005. Without the regular user knowing, the connection persists, but it should abruptly stop, disconnecting from IRC.
There's also the same issue with reconnecting to IRC (with clientReconnect). During reconnection, sometimes the regular user closes the browser before reaching raw 005, but the connection still reaches its goal. However, it should stop immediately, disregarding all commands sent to IRC, or even stopping the connection to IRC or jbnc altogether.
In summary, we need to find a way to send socket.end(); and close all connections if we exit jbnc without reaching 005/MOTD; here, it should either terminate jbnc or the IRC connection.
How would we go about doing this?
Best regards,