diff --git a/doc/en/weechat_relay_protocol.en.adoc b/doc/en/weechat_relay_protocol.en.adoc index 1858112e9..96d300b0b 100644 --- a/doc/en/weechat_relay_protocol.en.adoc +++ b/doc/en/weechat_relay_protocol.en.adoc @@ -168,6 +168,9 @@ WeeChat replies with a hashtable containing the following keys and values: compute the hash of password on this nonce, concatenated with a client nonce and the user password (the _relay_ nonce + the client nonce is the salt used in the password hash algorithm) +* _compression_: compression type: +** _zlib_: messages are compressed with _zlib_ +** _off_: messages are not compressed [TIP] With WeeChat ≤ 2.8, the command _handshake_ is not implemented, WeeChat silently diff --git a/doc/fr/weechat_relay_protocol.fr.adoc b/doc/fr/weechat_relay_protocol.fr.adoc index 34887a86f..709c4d432 100644 --- a/doc/fr/weechat_relay_protocol.fr.adoc +++ b/doc/fr/weechat_relay_protocol.fr.adoc @@ -177,6 +177,9 @@ suivantes : concaténé avec un nonce client et le mot de passe utilisateur (le nonce _relay_ + le nonce client constituent le sel utilisé dans l'algorithme de hachage du mot de passe) +* _compression_ : type de compression : +** _zlib_ : les messages sont compressés avec _zlib_ +** _off_ : les messages ne sont pas compressés [TIP] Avec WeeChat ≤ 2.8, la commande _handshake_ n'est pas implémentée, WeeChat ignore diff --git a/doc/ja/weechat_relay_protocol.ja.adoc b/doc/ja/weechat_relay_protocol.ja.adoc index 8e2d51f1b..cbb3549c0 100644 --- a/doc/ja/weechat_relay_protocol.ja.adoc +++ b/doc/ja/weechat_relay_protocol.ja.adoc @@ -177,6 +177,9 @@ WeeChat replies with a hashtable containing the following keys and values: compute the hash of password on this nonce, concatenated with a client nonce and the user password (the _relay_ nonce + the client nonce is the salt used in the password hash algorithm) +* _compression_: compression type: +** _zlib_: messages are compressed with _zlib_ +** _off_: messages are not compressed [TIP] With WeeChat ≤ 2.8, the command _handshake_ is not implemented, WeeChat silently diff --git a/src/plugins/relay/weechat/relay-weechat-protocol.c b/src/plugins/relay/weechat/relay-weechat-protocol.c index 55325df23..e833d5277 100644 --- a/src/plugins/relay/weechat/relay-weechat-protocol.c +++ b/src/plugins/relay/weechat/relay-weechat-protocol.c @@ -199,6 +199,10 @@ relay_weechat_protocol_handshake_reply (struct t_relay_client *client, hashtable, "totp", (totp_secret && totp_secret[0]) ? "on" : "off"); + weechat_hashtable_set ( + hashtable, + "compression", + relay_weechat_compression_string[RELAY_WEECHAT_DATA(client, compression)]); msg = relay_weechat_msg_new (id); if (msg) diff --git a/src/plugins/relay/weechat/relay-weechat.h b/src/plugins/relay/weechat/relay-weechat.h index c63bdca79..2bb875d1b 100644 --- a/src/plugins/relay/weechat/relay-weechat.h +++ b/src/plugins/relay/weechat/relay-weechat.h @@ -60,6 +60,8 @@ struct t_relay_weechat_data struct t_hook *hook_timer_nicklist; /* timer for sending nicklist */ }; +extern char *relay_weechat_compression_string[]; + extern int relay_weechat_compression_search (const char *compression); extern void relay_weechat_hook_signals (struct t_relay_client *client); extern void relay_weechat_unhook_signals (struct t_relay_client *client);