1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 08:43:13 +02:00

irc: clear the modelist if nothing was received before the end of list (invite/exception/ban/quiet)

This commit is contained in:
Sébastien Helleu
2018-03-24 19:02:01 +01:00
parent 4bdda6dd0a
commit 1dff661356
+40
View File
@@ -4029,7 +4029,17 @@ IRC_PROTOCOL_CALLBACK(347)
ptr_channel->buffer : server->buffer;
ptr_modelist = irc_modelist_search (ptr_channel, 'I');
if (ptr_modelist)
{
if (ptr_modelist->state != IRC_MODELIST_STATE_RECEIVING)
{
/*
* remove all items if no invite was received before
* the end of invite list
*/
irc_modelist_item_free_all (ptr_modelist);
}
ptr_modelist->state = IRC_MODELIST_STATE_RECEIVED;
}
weechat_printf_date_tags (
irc_msgbuffer_get_target_buffer (
server, NULL, command, "invitelist", ptr_buffer),
@@ -4191,7 +4201,17 @@ IRC_PROTOCOL_CALLBACK(349)
ptr_channel->buffer : server->buffer;
ptr_modelist = irc_modelist_search (ptr_channel, 'e');
if (ptr_modelist)
{
if (ptr_modelist->state != IRC_MODELIST_STATE_RECEIVING)
{
/*
* remove all items if no exception was received before
* the end of exception list
*/
irc_modelist_item_free_all (ptr_modelist);
}
ptr_modelist->state = IRC_MODELIST_STATE_RECEIVED;
}
weechat_printf_date_tags (
irc_msgbuffer_get_target_buffer (
server, NULL, command, "exceptionlist", ptr_buffer),
@@ -4982,7 +5002,17 @@ IRC_PROTOCOL_CALLBACK(368)
ptr_channel->buffer : server->buffer;
ptr_modelist = irc_modelist_search (ptr_channel, 'b');
if (ptr_modelist)
{
if (ptr_modelist->state != IRC_MODELIST_STATE_RECEIVING)
{
/*
* remove all items if no ban was received before
* the end of ban list
*/
irc_modelist_item_free_all (ptr_modelist);
}
ptr_modelist->state = IRC_MODELIST_STATE_RECEIVED;
}
weechat_printf_date_tags (
irc_msgbuffer_get_target_buffer (
server, NULL, command, "banlist", ptr_buffer),
@@ -5443,7 +5473,17 @@ IRC_PROTOCOL_CALLBACK(729)
ptr_channel->buffer : server->buffer;
ptr_modelist = irc_modelist_search (ptr_channel, argv[4][0]);
if (ptr_modelist)
{
if (ptr_modelist->state != IRC_MODELIST_STATE_RECEIVING)
{
/*
* remove all items if no quiet was received before
* the end of quiet list
*/
irc_modelist_item_free_all (ptr_modelist);
}
ptr_modelist->state = IRC_MODELIST_STATE_RECEIVED;
}
weechat_printf_date_tags (
irc_msgbuffer_get_target_buffer (
server, NULL, command, "quietlist", ptr_buffer),