diff --git a/CHANGELOG.md b/CHANGELOG.md index 3405cad18..c66fa6833 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ SPDX-License-Identifier: GPL-3.0-or-later ### Changed - core: add option `-e` to evaluate all commands before executing them in command `/eval` +- xfer: evaluate option xfer.network.own_ip ### Added diff --git a/po/cs.po b/po/cs.po index 59d87fab7..338bf266a 100644 --- a/po/cs.po +++ b/po/cs.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-16 13:15+0100\n" +"POT-Creation-Date: 2026-03-18 18:18+0100\n" "PO-Revision-Date: 2026-03-12 20:24+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -17171,8 +17171,9 @@ msgstr "nečekat na ACK při odesílání souboru" #| "IP or DNS address used for sending files/chats (if empty, local interface " #| "IP is used)" msgid "" -"IP or DNS address used for sending and passively receiving files/chats (if " -"empty, local interface IP is used)" +"IP or DNS address used for sending and passively receiving files/chats; if " +"empty, local interface IP is used (note: content is evaluated, see /help " +"eval)" msgstr "" "IP nebo DNS adresa použitá pro posílání souborů/rozhovorů (pokud je prázdné " "použije se lokální IP)" diff --git a/po/de.po b/po/de.po index 956670117..690007050 100644 --- a/po/de.po +++ b/po/de.po @@ -28,7 +28,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-16 13:15+0100\n" +"POT-Creation-Date: 2026-03-18 18:18+0100\n" "PO-Revision-Date: 2026-03-17 23:25+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -1841,9 +1841,6 @@ msgid "evaluate expression" msgstr "evaluierter Ausdruck" #. TRANSLATORS: only text between angle brackets (eg: "") may be translated -#| msgid "" -#| "[-n|-s] [-d] || [-n] [-d [-d]] -c " -#| "" msgid "" "[-n|-s] [-e] [-d] || [-n] [-d [-d]] -c " "" @@ -18721,9 +18718,14 @@ msgid "does not wait for ACK when sending file" msgstr "" "beim Versenden von Daten wird nicht auf ein Bestätigungssignal (ACK) gewartet" +#, fuzzy +#| msgid "" +#| "IP or DNS address used for sending and passively receiving files/chats " +#| "(if empty, local interface IP is used)" msgid "" -"IP or DNS address used for sending and passively receiving files/chats (if " -"empty, local interface IP is used)" +"IP or DNS address used for sending and passively receiving files/chats; if " +"empty, local interface IP is used (note: content is evaluated, see /help " +"eval)" msgstr "" "IP- oder DNS-Adresse, die zum Senden und passiven Empfangen von Dateien/" "Chats verwendet wird (falls kein Wert angegeben ist, wird die IP der lokalen " diff --git a/po/es.po b/po/es.po index f3801ef12..32de4048c 100644 --- a/po/es.po +++ b/po/es.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-16 13:15+0100\n" +"POT-Creation-Date: 2026-03-18 18:18+0100\n" "PO-Revision-Date: 2026-03-12 20:24+0100\n" "Last-Translator: Santiago Forero \n" "Language-Team: weechat-dev \n" @@ -17468,8 +17468,9 @@ msgstr "no esperar por el ACK al enviar un archivo" #| "IP or DNS address used for sending files/chats (if empty, local interface " #| "IP is used)" msgid "" -"IP or DNS address used for sending and passively receiving files/chats (if " -"empty, local interface IP is used)" +"IP or DNS address used for sending and passively receiving files/chats; if " +"empty, local interface IP is used (note: content is evaluated, see /help " +"eval)" msgstr "" "dirección IP o DNS usado para enviar archivos/charlas (si está vacío, se " "utiliza la IP de interfaz local)" diff --git a/po/fr.po b/po/fr.po index cd92ad954..99fd5cfbc 100644 --- a/po/fr.po +++ b/po/fr.po @@ -23,8 +23,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-16 13:15+0100\n" -"PO-Revision-Date: 2026-03-16 13:15+0100\n" +"POT-Creation-Date: 2026-03-18 18:18+0100\n" +"PO-Revision-Date: 2026-03-18 18:18+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -18380,11 +18380,13 @@ msgid "does not wait for ACK when sending file" msgstr "n'attend pas les accusés de réception lors de l'envoi de fichier" msgid "" -"IP or DNS address used for sending and passively receiving files/chats (if " -"empty, local interface IP is used)" +"IP or DNS address used for sending and passively receiving files/chats; if " +"empty, local interface IP is used (note: content is evaluated, see /help " +"eval)" msgstr "" "adresse IP ou DNS utilisée pour envoyer et recevoir de manière passive les " -"fichiers/discussions (si non renseigné, l'interface IP locale est utilisée)" +"fichiers/discussions ; si non renseigné, l'interface IP locale est utilisée " +"(note : le contenu est évalué, voir /help eval)" msgid "" "restricts outgoing files/chats and incoming/passive files to use only ports " diff --git a/po/hu.po b/po/hu.po index f5d6c8552..79d23771b 100644 --- a/po/hu.po +++ b/po/hu.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-16 13:15+0100\n" +"POT-Creation-Date: 2026-03-18 18:18+0100\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -16385,8 +16385,9 @@ msgstr "nem vár ACK válaszra fájl küldésekor" #, fuzzy msgid "" -"IP or DNS address used for sending and passively receiving files/chats (if " -"empty, local interface IP is used)" +"IP or DNS address used for sending and passively receiving files/chats; if " +"empty, local interface IP is used (note: content is evaluated, see /help " +"eval)" msgstr "kimenő dcc forgalom IP/DNS-címe (ha üres, a helyi interfész IP-címe)" #, fuzzy diff --git a/po/it.po b/po/it.po index 2d5137618..8720d9ab6 100644 --- a/po/it.po +++ b/po/it.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-16 13:15+0100\n" +"POT-Creation-Date: 2026-03-18 18:18+0100\n" "PO-Revision-Date: 2026-03-12 20:24+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -17556,8 +17556,9 @@ msgstr "non attendere ACK all'invio del file" #| "IP or DNS address used for sending files/chats (if empty, local interface " #| "IP is used)" msgid "" -"IP or DNS address used for sending and passively receiving files/chats (if " -"empty, local interface IP is used)" +"IP or DNS address used for sending and passively receiving files/chats; if " +"empty, local interface IP is used (note: content is evaluated, see /help " +"eval)" msgstr "" "Indirizzo IP o DNS per l'invio di file/chat (se vuoto, verrà usata " "l'interfaccia IP locale)" diff --git a/po/ja.po b/po/ja.po index 65b1f9211..bd02900c0 100644 --- a/po/ja.po +++ b/po/ja.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-16 13:15+0100\n" +"POT-Creation-Date: 2026-03-18 18:18+0100\n" "PO-Revision-Date: 2026-03-16 13:22+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: weechat-dev \n" @@ -17858,9 +17858,14 @@ msgstr "rozmiar bloku dla wysyłanych pakietów, w bajtach" msgid "does not wait for ACK when sending file" msgstr "nie czeka na potwierdzenie podczas wysyłania pliku" +#, fuzzy +#| msgid "" +#| "IP or DNS address used for sending and passively receiving files/chats " +#| "(if empty, local interface IP is used)" msgid "" -"IP or DNS address used for sending and passively receiving files/chats (if " -"empty, local interface IP is used)" +"IP or DNS address used for sending and passively receiving files/chats; if " +"empty, local interface IP is used (note: content is evaluated, see /help " +"eval)" msgstr "" "Adres IP lub DNS użyty do wysłania i pasywnego odbierania plików/rozmów " "(jeśli pusty zostanie użyty adres IP lokalnego interfejsu)" diff --git a/po/pt.po b/po/pt.po index 2687249c9..670c155b9 100644 --- a/po/pt.po +++ b/po/pt.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-16 13:15+0100\n" +"POT-Creation-Date: 2026-03-18 18:18+0100\n" "PO-Revision-Date: 2026-03-12 20:24+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -18040,8 +18040,9 @@ msgstr "não aguardar por ACK ao enviar ficheiros" #| "IP or DNS address used for sending files/chats (if empty, local interface " #| "IP is used)" msgid "" -"IP or DNS address used for sending and passively receiving files/chats (if " -"empty, local interface IP is used)" +"IP or DNS address used for sending and passively receiving files/chats; if " +"empty, local interface IP is used (note: content is evaluated, see /help " +"eval)" msgstr "" "IP ou endereço DNS usado para enviar ficheiros/chats (se vazio, é usado o IP " "da interface local)" diff --git a/po/pt_BR.po b/po/pt_BR.po index 01f26aaf9..4e8ebfe16 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -46,7 +46,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-16 13:15+0100\n" +"POT-Creation-Date: 2026-03-18 18:18+0100\n" "PO-Revision-Date: 2026-03-12 20:19+0100\n" "Last-Translator: Érico Nogueira \n" "Language-Team: weechat-dev \n" @@ -16945,8 +16945,9 @@ msgstr "não esperar por ACK quando enviar arquivo" #| "IP or DNS address used for sending files/chats (if empty, local interface " #| "IP is used)" msgid "" -"IP or DNS address used for sending and passively receiving files/chats (if " -"empty, local interface IP is used)" +"IP or DNS address used for sending and passively receiving files/chats; if " +"empty, local interface IP is used (note: content is evaluated, see /help " +"eval)" msgstr "" "Endereço IP ou DNS usado para enviar arquivos/chats (se vazio, interface " "local IP é usada)" diff --git a/po/ru.po b/po/ru.po index c967803af..75c102bf2 100644 --- a/po/ru.po +++ b/po/ru.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-16 13:15+0100\n" +"POT-Creation-Date: 2026-03-18 18:18+0100\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -16437,8 +16437,9 @@ msgstr "не ожидать ACK при отправке файла" #, fuzzy msgid "" -"IP or DNS address used for sending and passively receiving files/chats (if " -"empty, local interface IP is used)" +"IP or DNS address used for sending and passively receiving files/chats; if " +"empty, local interface IP is used (note: content is evaluated, see /help " +"eval)" msgstr "" "IP адрес или домен, используемый для исходящих DCC соединений (пустое " "значение означает текущий IP адрес)" diff --git a/po/sr.po b/po/sr.po index 6afa22eeb..7cdcfa26c 100644 --- a/po/sr.po +++ b/po/sr.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-16 13:15+0100\n" +"POT-Creation-Date: 2026-03-18 18:18+0100\n" "PO-Revision-Date: 2026-03-16 13:23+0100\n" "Last-Translator: Ivan Pešić \n" "Language-Team: weechat-dev \n" @@ -17826,9 +17826,14 @@ msgstr "величина блока за слање пакета, у бајто msgid "does not wait for ACK when sending file" msgstr "не чека се на ACK када се шаље фајл" +#, fuzzy +#| msgid "" +#| "IP or DNS address used for sending and passively receiving files/chats " +#| "(if empty, local interface IP is used)" msgid "" -"IP or DNS address used for sending and passively receiving files/chats (if " -"empty, local interface IP is used)" +"IP or DNS address used for sending and passively receiving files/chats; if " +"empty, local interface IP is used (note: content is evaluated, see /help " +"eval)" msgstr "" "IP или DNS адреса која се користи за слање и пасивно примање фајлова/" "разговора (ако је празно, користи се IP локалног интерфејса)" diff --git a/po/tr.po b/po/tr.po index 01cafb7b4..81d6c7734 100644 --- a/po/tr.po +++ b/po/tr.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-16 13:15+0100\n" +"POT-Creation-Date: 2026-03-18 18:18+0100\n" "PO-Revision-Date: 2026-03-16 13:23+0100\n" "Last-Translator: Emir SARI \n" "Language-Team: weechat-dev \n" @@ -18279,8 +18279,9 @@ msgstr "dosya gönderirken ACK için beklemez" #| "IP or DNS address used for sending files/chats (if empty, local interface " #| "IP is used)" msgid "" -"IP or DNS address used for sending and passively receiving files/chats (if " -"empty, local interface IP is used)" +"IP or DNS address used for sending and passively receiving files/chats; if " +"empty, local interface IP is used (note: content is evaluated, see /help " +"eval)" msgstr "" "dosya/sohbet göndermek için kullanılan IP veya DNS adresi (boşsa yerel " "arabirim IP adresi kullanılır)" diff --git a/po/weechat.pot b/po/weechat.pot index c60b6ad53..2230d000e 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-16 13:15+0100\n" +"POT-Creation-Date: 2026-03-18 18:18+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -15014,8 +15014,9 @@ msgid "does not wait for ACK when sending file" msgstr "" msgid "" -"IP or DNS address used for sending and passively receiving files/chats (if " -"empty, local interface IP is used)" +"IP or DNS address used for sending and passively receiving files/chats; if " +"empty, local interface IP is used (note: content is evaluated, see /help " +"eval)" msgstr "" msgid "" diff --git a/src/plugins/xfer/xfer-config.c b/src/plugins/xfer/xfer-config.c index 9ef61fbc3..684cd5294 100644 --- a/src/plugins/xfer/xfer-config.c +++ b/src/plugins/xfer/xfer-config.c @@ -273,8 +273,9 @@ xfer_config_init (void) xfer_config_network_own_ip = weechat_config_new_option ( xfer_config_file, xfer_config_section_network, "own_ip", "string", - N_("IP or DNS address used for sending and passively receiving files/chats " - "(if empty, local interface IP is used)"), + N_("IP or DNS address used for sending and passively receiving files/chats; " + "if empty, local interface IP is used " + "(note: content is evaluated, see /help eval)"), NULL, 0, 0, "", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); xfer_config_network_port_range = weechat_config_new_option ( diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index fb2e8dc6e..f76166b1a 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -1001,8 +1001,8 @@ xfer_add_cb (const void *pointer, void *data, const char *plugin_name, *plugin_id, *str_type, *str_protocol; const char *remote_nick, *local_nick, *charset_modifier, *filename, *proxy; const char *str_address, *str_port, *token; - int type, protocol, args, port_start, port_end, sock, server_sock, port; - char *path, *filename2, *short_filename, *pos, str_port_temp[16]; + int type, protocol, args, port_start, port_end, sock, server_sock, port, rc; + char *path, *filename2, *short_filename, *pos, str_port_temp[16], *eval_own_ip; struct stat st; struct sockaddr_storage local_addr_storage, remote_addr_storage, own_ip_addr, bind_addr; struct sockaddr *local_addr = (struct sockaddr*)&local_addr_storage; @@ -1205,16 +1205,19 @@ xfer_add_cb (const void *pointer, void *data, && weechat_config_string (xfer_config_network_own_ip)[0]) { /* resolve own_ip to a numeric address */ - str_address = weechat_config_string (xfer_config_network_own_ip); + eval_own_ip = weechat_string_eval_expression ( + weechat_config_string (xfer_config_network_own_ip), + NULL, NULL, NULL); + if (!eval_own_ip) + goto error; local_addr_length = sizeof (own_ip_addr); - - if (!xfer_network_resolve_addr (str_address, NULL, + rc = xfer_network_resolve_addr (eval_own_ip, NULL, (struct sockaddr*)&own_ip_addr, &local_addr_length, - AI_NUMERICSERV)) - { + AI_NUMERICSERV); + free (eval_own_ip); + if (!rc) goto error; - } /* set the advertised address to own_ip */ local_addr = (struct sockaddr*)&own_ip_addr;