mirror of
https://github.com/weechat/weechat.git
synced 2026-06-24 11:56:38 +02:00
irc: implement capability upgrading fully
This commit is contained in:
@@ -375,14 +375,26 @@ irc_upgrade_read_cb (const void *pointer, void *data,
|
||||
str = weechat_infolist_string (infolist, "nick_modes");
|
||||
if (str)
|
||||
irc_upgrade_current_server->nick_modes = strdup (str);
|
||||
/* TODO: "cap_list" is new in WeeChat x.y.z */
|
||||
/* "cap_ls" and "cap_list" replace "cap_away_notify" and "cap_account_notify" in WeeChat x.y.z */
|
||||
if (weechat_infolist_integer (infolist, "cap_away_notify"))
|
||||
{
|
||||
weechat_hashtable_set (irc_upgrade_current_server->cap_ls, "away-notify", NULL);
|
||||
weechat_hashtable_set (irc_upgrade_current_server->cap_list, "away-notify", NULL);
|
||||
}
|
||||
if (weechat_infolist_integer (infolist, "cap_account_notify"))
|
||||
{
|
||||
weechat_hashtable_set (irc_upgrade_current_server->cap_ls, "account-notify", NULL);
|
||||
weechat_hashtable_set (irc_upgrade_current_server->cap_list, "account-notify", NULL);
|
||||
}
|
||||
if (weechat_infolist_integer (infolist, "cap_extended_join"))
|
||||
{
|
||||
weechat_hashtable_set (irc_upgrade_current_server->cap_ls, "extended-join", NULL);
|
||||
weechat_hashtable_set (irc_upgrade_current_server->cap_list, "extended-join", NULL);
|
||||
/* TODO: transfer all of "cap_ls" and "cap_list" */
|
||||
}
|
||||
weechat_hashtable_add_from_infolist (
|
||||
irc_upgrade_current_server->cap_ls, infolist, "cap_ls");
|
||||
weechat_hashtable_add_from_infolist (
|
||||
irc_upgrade_current_server->cap_list, infolist, "cap_list");
|
||||
|
||||
str = weechat_infolist_string (infolist, "isupport");
|
||||
if (str)
|
||||
|
||||
Reference in New Issue
Block a user