mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
irc: do not rejoin channels where /part has been issued before reconnection to server (bug #33029)
This commit is contained in:
@@ -45,6 +45,8 @@ Version 0.3.5 (under dev!)
|
||||
* core: allow background for nick colors (using ":")
|
||||
* api: add new function buffer_match_list
|
||||
* aspell: fix spellers used after switch of window (bug #32811)
|
||||
* irc: do not rejoin channels where /part has been issued before reconnection
|
||||
to server (bug #33029)
|
||||
* irc: use nick color for users outside the channel
|
||||
* irc: replace options irc.color.nick_prefix_{op|halfop|voice|user} by a single
|
||||
option irc.color.nick_prefixes (task #10888)
|
||||
|
||||
@@ -260,6 +260,7 @@ irc_channel_new (struct t_irc_server *server, int channel_type,
|
||||
new_channel->away_message = NULL;
|
||||
new_channel->has_quit_server = 0;
|
||||
new_channel->cycle = 0;
|
||||
new_channel->part = 0;
|
||||
new_channel->display_creation_date = 0;
|
||||
new_channel->nick_completion_reset = 0;
|
||||
new_channel->pv_remote_nick_color = NULL;
|
||||
@@ -887,6 +888,8 @@ irc_channel_add_to_infolist (struct t_infolist *infolist,
|
||||
return 0;
|
||||
if (!weechat_infolist_new_var_integer (ptr_item, "cycle", channel->cycle))
|
||||
return 0;
|
||||
if (!weechat_infolist_new_var_integer (ptr_item, "part", channel->part))
|
||||
return 0;
|
||||
if (!weechat_infolist_new_var_integer (ptr_item, "display_creation_date", channel->display_creation_date))
|
||||
return 0;
|
||||
if (!weechat_infolist_new_var_integer (ptr_item, "nick_completion_reset", channel->nick_completion_reset))
|
||||
@@ -955,6 +958,7 @@ irc_channel_print_log (struct t_irc_channel *channel)
|
||||
weechat_log_printf (" away_message . . . . . . : '%s'", channel->away_message);
|
||||
weechat_log_printf (" has_quit_server. . . . . : %d", channel->has_quit_server);
|
||||
weechat_log_printf (" cycle. . . . . . . . . . : %d", channel->cycle);
|
||||
weechat_log_printf (" part . . . . . . . . . . : %d", channel->part);
|
||||
weechat_log_printf (" display_creation_date. . : %d", channel->display_creation_date);
|
||||
weechat_log_printf (" nick_completion_reset. . : %d", channel->nick_completion_reset);
|
||||
weechat_log_printf (" pv_remote_nick_color . . : '%s'", channel->pv_remote_nick_color);
|
||||
|
||||
@@ -52,6 +52,7 @@ struct t_irc_channel
|
||||
int has_quit_server; /* =1 if nick has quit (pv only), to */
|
||||
/* display message when he's back */
|
||||
int cycle; /* currently cycling (/part + /join) */
|
||||
int part; /* /part done on channel? */
|
||||
int display_creation_date; /* 1 for displaying creation date */
|
||||
int nick_completion_reset; /* 1 for resetting nick completion */
|
||||
/* there was some join/part on chan */
|
||||
|
||||
@@ -461,7 +461,11 @@ IRC_PROTOCOL_CALLBACK(join)
|
||||
pos_channel = (argv[2][0] == ':') ? argv[2] + 1 : argv[2];
|
||||
|
||||
ptr_channel = irc_channel_search (server, pos_channel);
|
||||
if (!ptr_channel)
|
||||
if (ptr_channel)
|
||||
{
|
||||
ptr_channel->part = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* if someone else joins and channel is not opened, then just
|
||||
@@ -1272,6 +1276,8 @@ IRC_PROTOCOL_CALLBACK(part)
|
||||
{
|
||||
if (weechat_config_boolean (irc_config_look_part_closes_buffer))
|
||||
weechat_buffer_close (ptr_channel->buffer);
|
||||
else
|
||||
ptr_channel->part = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -3499,7 +3499,8 @@ irc_server_autojoin_channels (struct t_irc_server *server)
|
||||
for (ptr_channel = server->channels; ptr_channel;
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
|
||||
if ((ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
|
||||
&& !ptr_channel->part)
|
||||
{
|
||||
if (ptr_channel->key)
|
||||
{
|
||||
|
||||
@@ -416,6 +416,7 @@ irc_upgrade_read_cb (void *data,
|
||||
irc_upgrade_current_channel->away_message = strdup (str);
|
||||
irc_upgrade_current_channel->has_quit_server = weechat_infolist_integer (infolist, "has_quit_server");
|
||||
irc_upgrade_current_channel->cycle = weechat_infolist_integer (infolist, "cycle");
|
||||
irc_upgrade_current_channel->part = weechat_infolist_integer (infolist, "part");
|
||||
irc_upgrade_current_channel->display_creation_date = weechat_infolist_integer (infolist, "display_creation_date");
|
||||
irc_upgrade_current_channel->nick_completion_reset = weechat_infolist_integer (infolist, "nick_completion_reset");
|
||||
for (i = 0; i < 2; i++)
|
||||
|
||||
Reference in New Issue
Block a user