mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
xfer: evaluate option xfer.network.own_ip
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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 <mimi.vx@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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)"
|
||||
|
||||
@@ -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 <weechatter@arcor.de>\n"
|
||||
"Language-Team: German <kde-i18n-de@kde.org>\n"
|
||||
@@ -1841,9 +1841,6 @@ msgid "evaluate expression"
|
||||
msgstr "evaluierter Ausdruck"
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
#| msgid ""
|
||||
#| "[-n|-s] [-d] <expression> || [-n] [-d [-d]] -c <expression1> <operator> "
|
||||
#| "<expression2>"
|
||||
msgid ""
|
||||
"[-n|-s] [-e] [-d] <expression> || [-n] [-d [-d]] -c <expression1> <operator> "
|
||||
"<expression2>"
|
||||
@@ -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 "
|
||||
|
||||
@@ -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 <santiago@forero.xyz>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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)"
|
||||
|
||||
@@ -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 <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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 "
|
||||
|
||||
@@ -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 <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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
|
||||
|
||||
@@ -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 <exio4.com@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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)"
|
||||
|
||||
@@ -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 <i38w7i3@yahoo.co.jp>\n"
|
||||
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
|
||||
@@ -18143,8 +18143,9 @@ msgstr "ファイル送信時に肯定応答を待たない"
|
||||
#| "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 か DNS アドレス (空の場合、ローカルインター"
|
||||
"フェース IP を使う)"
|
||||
|
||||
@@ -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-16 13:23+0100\n"
|
||||
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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)"
|
||||
|
||||
@@ -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 <vascomalmeida@sapo.pt>\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)"
|
||||
|
||||
+4
-3
@@ -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 <ericonr@disroot.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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)"
|
||||
|
||||
@@ -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 <ixti@member.fsf.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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 адрес)"
|
||||
|
||||
@@ -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ć <ivan.pesic@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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 локалног интерфејса)"
|
||||
|
||||
@@ -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 <emir_sari@icloud.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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)"
|
||||
|
||||
+4
-3
@@ -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 <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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 ""
|
||||
|
||||
@@ -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 (
|
||||
|
||||
+11
-8
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user