Add an option to disable rejoin on auto reconnect
This change adds an option `irc_reconnect_rejoin` (default ON) which when turned OFF will prevent hexchat from rejoining channels after an auto reconnect. hexchat/hexchat#2069
This commit is contained in:
parent
4188f26ab9
commit
8ddd5e3778
|
@ -496,6 +496,7 @@ const struct prefs vars[] =
|
||||||
{"input_tray_priv", P_OFFINT (hex_input_tray_priv), TYPE_BOOL},
|
{"input_tray_priv", P_OFFINT (hex_input_tray_priv), TYPE_BOOL},
|
||||||
|
|
||||||
{"irc_auto_rejoin", P_OFFINT (hex_irc_auto_rejoin), TYPE_BOOL},
|
{"irc_auto_rejoin", P_OFFINT (hex_irc_auto_rejoin), TYPE_BOOL},
|
||||||
|
{"irc_reconnect_rejoin", P_OFFINT (hex_irc_reconnect_rejoin), TYPE_BOOL},
|
||||||
{"irc_ban_type", P_OFFINT (hex_irc_ban_type), TYPE_INT},
|
{"irc_ban_type", P_OFFINT (hex_irc_ban_type), TYPE_INT},
|
||||||
{"irc_cap_server_time", P_OFFINT (hex_irc_cap_server_time), TYPE_BOOL},
|
{"irc_cap_server_time", P_OFFINT (hex_irc_cap_server_time), TYPE_BOOL},
|
||||||
{"irc_conf_mode", P_OFFINT (hex_irc_conf_mode), TYPE_BOOL},
|
{"irc_conf_mode", P_OFFINT (hex_irc_conf_mode), TYPE_BOOL},
|
||||||
|
@ -777,6 +778,7 @@ load_default_config(void)
|
||||||
prefs.hex_input_flash_priv = 1;
|
prefs.hex_input_flash_priv = 1;
|
||||||
prefs.hex_input_tray_hilight = 1;
|
prefs.hex_input_tray_hilight = 1;
|
||||||
prefs.hex_input_tray_priv = 1;
|
prefs.hex_input_tray_priv = 1;
|
||||||
|
prefs.hex_irc_reconnect_rejoin = 1;
|
||||||
prefs.hex_irc_cap_server_time = 1;
|
prefs.hex_irc_cap_server_time = 1;
|
||||||
prefs.hex_irc_logging = 1;
|
prefs.hex_irc_logging = 1;
|
||||||
prefs.hex_irc_who_join = 1; /* Can kick with inordinate amount of channels, required for some of our features though, TODO: add cap like away check? */
|
prefs.hex_irc_who_join = 1; /* Can kick with inordinate amount of channels, required for some of our features though, TODO: add cap like away check? */
|
||||||
|
|
|
@ -170,6 +170,7 @@ struct hexchatprefs
|
||||||
unsigned int hex_input_tray_hilight;
|
unsigned int hex_input_tray_hilight;
|
||||||
unsigned int hex_input_tray_priv;
|
unsigned int hex_input_tray_priv;
|
||||||
unsigned int hex_irc_auto_rejoin;
|
unsigned int hex_irc_auto_rejoin;
|
||||||
|
unsigned int hex_irc_reconnect_rejoin;
|
||||||
unsigned int hex_irc_conf_mode;
|
unsigned int hex_irc_conf_mode;
|
||||||
unsigned int hex_irc_hidehost;
|
unsigned int hex_irc_hidehost;
|
||||||
unsigned int hex_irc_hide_nickchange;
|
unsigned int hex_irc_hide_nickchange;
|
||||||
|
|
|
@ -681,12 +681,14 @@ static void
|
||||||
auto_reconnect (server *serv, int send_quit, int err)
|
auto_reconnect (server *serv, int send_quit, int err)
|
||||||
{
|
{
|
||||||
session *s;
|
session *s;
|
||||||
GSList *list;
|
|
||||||
int del;
|
int del;
|
||||||
|
|
||||||
if (serv->server_session == NULL)
|
if (serv->server_session == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (prefs.hex_irc_reconnect_rejoin)
|
||||||
|
{
|
||||||
|
GSList *list;
|
||||||
list = sess_list;
|
list = sess_list;
|
||||||
while (list) /* make sure auto rejoin can work */
|
while (list) /* make sure auto rejoin can work */
|
||||||
{
|
{
|
||||||
|
@ -698,6 +700,7 @@ auto_reconnect (server *serv, int send_quit, int err)
|
||||||
}
|
}
|
||||||
list = list->next;
|
list = list->next;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (serv->connected)
|
if (serv->connected)
|
||||||
server_disconnect (serv->server_session, send_quit, err);
|
server_disconnect (serv->server_session, send_quit, err);
|
||||||
|
|
Loading…
Reference in New Issue