1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 01:03:14 +02:00

irc: fix autojoin on server connection (closes #1873)

Now the autojoin is made only one time, until the server buffer is closed.

A new flag `autojoin_done` is added to know whether the autojoin has already
been done or not on the server.  It is set to 1 on first autojoin, and reset to
0 only if the server buffer is closed.

The flag `reconnect_join` is removed, because it is now obsolete.
This commit is contained in:
Sébastien Helleu
2023-01-21 19:22:31 +01:00
parent e0cdfb1cef
commit 55d08a604f
6 changed files with 46 additions and 43 deletions
+3
View File
@@ -219,6 +219,9 @@ irc_buffer_close_cb (const void *pointer, void *data,
ptr_server->reconnect_delay = 0;
ptr_server->reconnect_start = 0;
/* consider auto-join has never been done */
ptr_server->autojoin_done = 0;
/* close server channels/privates */
ptr_channel = ptr_server->channels;
while (ptr_channel)