mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 09:43:13 +02:00
irc: add support for CAP account-notify
This commit is contained in:
@@ -993,6 +993,7 @@ irc_server_alloc (const char *name)
|
||||
new_server->nick = NULL;
|
||||
new_server->nick_modes = NULL;
|
||||
new_server->cap_away_notify = 0;
|
||||
new_server->cap_account_notify = 0;
|
||||
new_server->isupport = NULL;
|
||||
new_server->prefix_modes = NULL;
|
||||
new_server->prefix_chars = NULL;
|
||||
@@ -4525,6 +4526,7 @@ irc_server_disconnect (struct t_irc_server *server, int switch_address,
|
||||
weechat_bar_item_update ("irc_nick_modes");
|
||||
}
|
||||
server->cap_away_notify = 0;
|
||||
server->cap_account_notify = 0;
|
||||
server->is_away = 0;
|
||||
server->away_time = 0;
|
||||
server->lag = 0;
|
||||
@@ -4795,7 +4797,7 @@ irc_server_check_away (struct t_irc_server *server)
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
|
||||
irc_channel_check_away (server, ptr_channel);
|
||||
irc_channel_check_whox (server, ptr_channel);
|
||||
}
|
||||
server->last_away_check = time (NULL);
|
||||
}
|
||||
@@ -5106,6 +5108,7 @@ irc_server_hdata_server_cb (void *data, const char *hdata_name)
|
||||
WEECHAT_HDATA_VAR(struct t_irc_server, nick, STRING, 0, NULL, NULL);
|
||||
WEECHAT_HDATA_VAR(struct t_irc_server, nick_modes, STRING, 0, NULL, NULL);
|
||||
WEECHAT_HDATA_VAR(struct t_irc_server, cap_away_notify, INTEGER, 0, NULL, NULL);
|
||||
WEECHAT_HDATA_VAR(struct t_irc_server, cap_account_notify, INTEGER, 0, NULL, NULL);
|
||||
WEECHAT_HDATA_VAR(struct t_irc_server, isupport, STRING, 0, NULL, NULL);
|
||||
WEECHAT_HDATA_VAR(struct t_irc_server, prefix_modes, STRING, 0, NULL, NULL);
|
||||
WEECHAT_HDATA_VAR(struct t_irc_server, prefix_chars, STRING, 0, NULL, NULL);
|
||||
@@ -5322,6 +5325,8 @@ irc_server_add_to_infolist (struct t_infolist *infolist,
|
||||
return 0;
|
||||
if (!weechat_infolist_new_var_integer (ptr_item, "cap_away_notify", server->cap_away_notify))
|
||||
return 0;
|
||||
if (!weechat_infolist_new_var_integer (ptr_item, "cap_account_notify", server->cap_account_notify))
|
||||
return 0;
|
||||
if (!weechat_infolist_new_var_string (ptr_item, "isupport", server->isupport))
|
||||
return 0;
|
||||
if (!weechat_infolist_new_var_string (ptr_item, "prefix_modes", server->prefix_modes))
|
||||
@@ -5682,6 +5687,7 @@ irc_server_print_log ()
|
||||
weechat_log_printf (" nick . . . . . . . . : '%s'", ptr_server->nick);
|
||||
weechat_log_printf (" nick_modes . . . . . : '%s'", ptr_server->nick_modes);
|
||||
weechat_log_printf (" cap_away_notify. . . : %d", ptr_server->cap_away_notify);
|
||||
weechat_log_printf (" cap_account_notify . : %d", ptr_server->cap_account_notify);
|
||||
weechat_log_printf (" isupport . . . . . . : '%s'", ptr_server->isupport);
|
||||
weechat_log_printf (" prefix_modes . . . . : '%s'", ptr_server->prefix_modes);
|
||||
weechat_log_printf (" prefix_chars . . . . : '%s'", ptr_server->prefix_chars);
|
||||
|
||||
Reference in New Issue
Block a user