diff options
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | po/cs.po | 6 | ||||
-rw-r--r-- | po/de.po | 70 | ||||
-rw-r--r-- | po/es.po | 6 | ||||
-rw-r--r-- | po/fr.po | 10 | ||||
-rw-r--r-- | po/hu.po | 6 | ||||
-rw-r--r-- | po/it.po | 6 | ||||
-rw-r--r-- | po/ja.po | 6 | ||||
-rw-r--r-- | po/pl.po | 6 | ||||
-rw-r--r-- | po/pt.po | 6 | ||||
-rw-r--r-- | po/pt_BR.po | 6 | ||||
-rw-r--r-- | po/ru.po | 6 | ||||
-rw-r--r-- | po/sr.po | 6 | ||||
-rw-r--r-- | po/tr.po | 6 | ||||
-rw-r--r-- | po/weechat.pot | 6 | ||||
-rw-r--r-- | src/plugins/relay/api/remote/relay-remote-network.c | 4 | ||||
-rw-r--r-- | src/plugins/relay/relay-config.c | 25 | ||||
-rw-r--r-- | src/plugins/relay/relay-config.h | 2 |
18 files changed, 109 insertions, 75 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 93c9a8052..be70b0347 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -45,6 +45,7 @@ New features:: * relay: add "api" protocol (HTTP REST API), add option relay.look.display_clients, change option type relay.look.auto_open_buffer to string, rename option relay.weechat.commands to relay.network.commands, add option relay.network.time_window (issue #2066) * relay: add support of websocket extension "permessage-deflate" (issue #1549) * relay: add command `/remote` to manage remote WeeChat relay servers and connect to them (issue #2066) + * relay: add option relay.api.remote_get_lines (issue #2066) * script: add option `enable` in command `/script` * script: add info "script_loaded" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-04-14 19:13+0200\n" +"POT-Creation-Date: 2024-05-01 10:08+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -14574,6 +14574,10 @@ msgid "" "sent as irc tag); empty string = disable time in backlog messages" msgstr "" +msgid "" +"number of lines to retrieve on each buffer when connecting to a remote relay" +msgstr "" + #, fuzzy, c-format msgid "%s%s: invalid websocket handshake received for client %s%s%s" msgstr "%s%s: TLS handshake selhal" @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-04-14 19:13+0200\n" +"POT-Creation-Date: 2024-05-01 10:08+0200\n" "PO-Revision-Date: 2024-04-15 13:01+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <kde-i18n-de@kde.org>\n" @@ -98,31 +98,6 @@ msgstr "" msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "Aufruf: %s [Option...] [Erweiterung:Option...]\n" -#| msgid "" -#| " -a, --no-connect disable auto-connect to servers at startup\n" -#| " -c, --colors display default colors in terminal and exit\n" -#| " -d, --dir <path> force a single WeeChat home directory\n" -#| " or 4 different directories separated by colons " -#| "(in this order: config, data, cache, runtime)\n" -#| " (environment variable WEECHAT_HOME is read if " -#| "this option is not given)\n" -#| " -t, --temp-dir create a temporary WeeChat home directory and " -#| "delete it on exit\n" -#| " (incompatible with option \"-d\")\n" -#| " -h, --help display this help and exit\n" -#| " -l, --license display WeeChat license and exit\n" -#| " -p, --no-plugin don't load any plugin at startup\n" -#| " -P, --plugins <plugins> load only these plugins at startup\n" -#| " (see /help weechat.plugin.autoload)\n" -#| " -r, --run-command <cmd> run command(s) after startup;\n" -#| " many commands can be separated by semicolons " -#| "and are evaluated,\n" -#| " this option can be given multiple times\n" -#| " -s, --no-script don't load any script at startup\n" -#| " --upgrade upgrade WeeChat using session files (see /help " -#| "upgrade in WeeChat)\n" -#| " -v, --version display WeeChat version and exit\n" -#| " plugin:option option for plugin (see man weechat)\n" msgid "" " -a, --no-connect disable auto-connect to servers at startup\n" " -c, --colors display default colors in terminal and exit\n" @@ -1951,14 +1926,12 @@ msgstr " - ${weechat_config_dir}: WeeChat Konfigurationsverzeichnis" msgid " - ${weechat_data_dir}: WeeChat data directory" msgstr " - ${weechat_data_dir}: WeeChat Datenverzeichnis" -#| msgid " - ${weechat_data_dir}: WeeChat data directory" msgid " - ${weechat_state_dir}: WeeChat state directory" msgstr " - ${weechat_state_dir}: WeeChat-Statusverzeichnis" msgid " - ${weechat_cache_dir}: WeeChat cache directory" msgstr " - ${weechat_cache_dir}: WeeChat Cache Verzeichnis" -#| msgid " - ${weechat_runtmie_dir}: WeeChat runtime directory" msgid " - ${weechat_runtime_dir}: WeeChat runtime directory" msgstr " - ${weechat_runtime_dir}: WeeChat-Laufzeitverzeichnis" @@ -6375,16 +6348,12 @@ msgid "Error: not enough memory\n" msgstr "Fehler: nicht genügend Speicher\n" #, c-format -#| msgid "" -#| "Error: wrong number of paths for home directories (expected: 1 or 4, " -#| "received: %d)\n" msgid "" "Error: wrong number of paths for home directories (expected: 1 or 5, " "received: %d)\n" msgstr "" -"Fehler: falsche Anzahl von Pfaden für Heimatverzeichnisse (erwartet: 1 oder" -" 5, " -"empfangen: %d)\n" +"Fehler: falsche Anzahl von Pfaden für Heimatverzeichnisse (erwartet: 1 oder " +"5, empfangen: %d)\n" #, c-format msgid "" @@ -14379,10 +14348,6 @@ msgstr "WeeChat PID (Prozess-ID)" msgid "directory separator" msgstr "Trennzeichen für Verzeichnis" -#| msgid "" -#| "WeeChat directory (*deprecated* since version 3.2, replaced by " -#| "\"weechat_config_dir\", \"weechat_data_dir\", \"weechat_cache_dir\" and " -#| "\"weechat_runtime_dir\")" msgid "" "WeeChat directory (*deprecated* since version 3.2, replaced by " "\"weechat_config_dir\", \"weechat_data_dir\", \"weechat_state_dir\" , " @@ -14398,7 +14363,6 @@ msgstr "WeeChat Konfigurationsverzeichnis" msgid "WeeChat data directory" msgstr "WeeChat-Datenverzeichnis" -#| msgid "WeeChat data directory" msgid "WeeChat state directory" msgstr "WeeChat-Statusverzeichnis" @@ -15132,70 +15096,57 @@ msgid "%sremote[%s]: unable to create socket" msgstr "%sremote[%s]: Socket kann nicht erstellt werden" #, c-format -#| msgid "%sgnutls: failed to initialize certificate structure" msgid "%sremote[%s]: gnutls: failed to initialize certificate structure" msgstr "" "%sremote[%s]: gnutls: Initialisierung der Zertifikatstruktur fehlgeschlagen" #, c-format -#| msgid "%sgnutls: receiving %d certificate" -#| msgid_plural "%sgnutls: receiving %d certificates" msgid "remote[%s]: gnutls: receiving %d certificate" msgid_plural "remote[%s]: gnutls: receiving %d certificates" msgstr[0] "remote[%s]: gnutls: empfange %d Zertifikat" msgstr[1] "remote[%s]: gnutls: empfange %d Zertifikate" #, c-format -#| msgid "%sgnutls: failed to import certificate[%d]" msgid "%sremote[%s]: gnutls: failed to import certificate[%d]" msgstr "%sremote[%s]: gnutls: Zertifikat[%d] konnte nicht importiert werden" #, c-format -#| msgid "%s - certificate[%d] info:" msgid "remote[%s] - certificate[%d] info:" msgstr "remote[%s] - Zertifikat[%d]-Information:" #, c-format -#| msgid "%sgnutls: certificate has expired" msgid "%sremote[%s]: gnutls: certificate has expired" msgstr "" "%sremote[%s]: gnutls: die Gültigkeitsdauer des Zertifikates ist abgelaufen" #, c-format -#| msgid "%sgnutls: certificate is not yet activated" msgid "%sremote[%s]: gnutls: certificate is not yet activated" msgstr "%sremote[%s]: gnutls: Zertifikat ist noch nicht freigeschaltet" #, c-format -#| msgid "%sgnutls: the hostname in the certificate does NOT match \"%s\"" msgid "" "%sremote[%s]: gnutls: the hostname in the certificate does NOT match \"%s\"" msgstr "" "%sremote[%s]: gnutls:der Hostname im Zertifikat \"%s\" stimmt NICHT überein" #, c-format -#| msgid "%sgnutls: error while checking peer's certificate" msgid "%sremote[%s]: gnutls: error while checking peer's certificate" msgstr "%sremote[%s]: gnutls: Fehler bei der Überprüfung des Peer-Zertifikates" #, c-format -#| msgid "%sgnutls: peer's certificate is NOT trusted" msgid "%sremote[%s]: gnutls: peer's certificate is NOT trusted" msgstr "%sremote[%s]: gnutls: Peer-Zertifikat ist NICHT vertrauenswürdig" #, c-format -#| msgid "%sgnutls: peer's certificate is trusted" msgid "remote[%s]: gnutls: peer's certificate is trusted" msgstr "remote[%s]: gnutls:Peer-Zertifikat ist vertrauenswürdig" #, c-format -#| msgid "%sgnutls: peer's certificate issuer is unknown" msgid "%sremote[%s]: gnutls: peer's certificate issuer is unknown" msgstr "" "%sremote[%s]: gnutls: Der Aussteller für das Peer-Zertifikat ist unbekannt" #, c-format -#| msgid "%sgnutls: the certificate has been revoked" msgid "%sremote[%s]: gnutls: the certificate has been revoked" msgstr "%sremote[%s]: gnutls: Das Zertifikat wurde widerrufen" @@ -15225,18 +15176,15 @@ msgstr "" "Iterationen=%d, totp=%d" #, c-format -#| msgid "%s%s: proxy \"%s\" not found for server \"%s\", cannot connect" msgid "%sremote[%s]: proxy \"%s\" not found, cannot connect" msgstr "" -"%sremote[%s]: Proxy \"%s\" nicht gefunden, kann keine Verbindung " -"herstellen" +"%sremote[%s]: Proxy \"%s\" nicht gefunden, kann keine Verbindung herstellen" #, c-format -#| msgid "%s%s: missing proxy settings, check options for proxy \"%s\"" msgid "%sremote[%s]: missing proxy settings, check options for proxy \"%s\"" msgstr "" -"%sremote[%s]: fehlende Proxy-Einstellungen, Optionen für den Proxy \"%s\"" -" überprüfen" +"%sremote[%s]: fehlende Proxy-Einstellungen, Optionen für den Proxy \"%s\" " +"überprüfen" #, c-format msgid "%s%s: already connected to remote relay \"%s\"!" @@ -16072,6 +16020,10 @@ msgstr "" "gesendet wird); keine Zeichenkette = deaktiviert die Zeitanzeige im " "Verlaufsspeicher" +msgid "" +"number of lines to retrieve on each buffer when connecting to a remote relay" +msgstr "" + #, c-format msgid "%s%s: invalid websocket handshake received for client %s%s%s" msgstr "%s%s: ungültigen WebSocket Handshake für Client %s%s%s empfangen" @@ -18447,5 +18399,3 @@ msgstr "%s%s: Zeitüberschreitung für \"%s\" mit %s" msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "" "%s%s: Verbindung konnte nicht hergestellt werden: unerwarteter Fehler (%d)" - - @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-04-14 19:13+0200\n" +"POT-Creation-Date: 2024-05-01 10:08+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n" "Last-Translator: Santiago Forero <santiago@forero.xyz>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -14905,6 +14905,10 @@ msgid "" "sent as irc tag); empty string = disable time in backlog messages" msgstr "" +msgid "" +"number of lines to retrieve on each buffer when connecting to a remote relay" +msgstr "" + #, fuzzy, c-format msgid "%s%s: invalid websocket handshake received for client %s%s%s" msgstr "%s%s: agotado el tiempo de espera del saludo TLS del cliente %s%s%s" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-04-14 19:13+0200\n" -"PO-Revision-Date: 2024-04-14 19:15+0200\n" +"POT-Creation-Date: 2024-05-01 10:08+0200\n" +"PO-Revision-Date: 2024-05-01 10:09+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -15701,6 +15701,12 @@ msgstr "" "activée par le client, car l'heure est envoyée sous forme d'étiquette irc) ; " "chaîne vide = désactiver l'heure dans les messages d'historique" +msgid "" +"number of lines to retrieve on each buffer when connecting to a remote relay" +msgstr "" +"nombre de lignes à récupérer sur chaque tampon lors d'une connexion à un " +"relai distant" + #, c-format msgid "%s%s: invalid websocket handshake received for client %s%s%s" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-04-14 19:13+0200\n" +"POT-Creation-Date: 2024-05-01 10:08+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -13952,6 +13952,10 @@ msgid "" "sent as irc tag); empty string = disable time in backlog messages" msgstr "" +msgid "" +"number of lines to retrieve on each buffer when connecting to a remote relay" +msgstr "" + #, fuzzy, c-format msgid "%s%s: invalid websocket handshake received for client %s%s%s" msgstr "%s gnutls kézfogás sikertelen\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-04-14 19:13+0200\n" +"POT-Creation-Date: 2024-05-01 10:08+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -14946,6 +14946,10 @@ msgid "" "sent as irc tag); empty string = disable time in backlog messages" msgstr "" +msgid "" +"number of lines to retrieve on each buffer when connecting to a remote relay" +msgstr "" + #, c-format msgid "%s%s: invalid websocket handshake received for client %s%s%s" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-04-14 19:13+0200\n" +"POT-Creation-Date: 2024-05-01 10:08+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" @@ -15406,6 +15406,10 @@ msgstr "" "\"server-time\" 機能を利用可能にした場合、これは利用されません); 空文字列 = " "バックログメッセージで時間を表示しない" +msgid "" +"number of lines to retrieve on each buffer when connecting to a remote relay" +msgstr "" + #, c-format msgid "%s%s: invalid websocket handshake received for client %s%s%s" msgstr "" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-04-14 19:13+0200\n" +"POT-Creation-Date: 2024-05-01 10:08+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -15483,6 +15483,10 @@ msgstr "" "czas jest wysyłany jako tag irc); pusty ciąg = wyłącza znacznik czasu w " "backlogu" +msgid "" +"number of lines to retrieve on each buffer when connecting to a remote relay" +msgstr "" + #, c-format msgid "%s%s: invalid websocket handshake received for client %s%s%s" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-04-14 19:13+0200\n" +"POT-Creation-Date: 2024-05-01 10:08+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -15295,6 +15295,10 @@ msgstr "" "pelo cliente, porque o tempo é enviado como tag de irc); cadeia vazia = " "desativar hora nas mensagens do registo recente" +msgid "" +"number of lines to retrieve on each buffer when connecting to a remote relay" +msgstr "" + #, c-format msgid "%s%s: invalid websocket handshake received for client %s%s%s" msgstr "%s%s: websocket handshake inválido recebido do cliente %s%s%s" diff --git a/po/pt_BR.po b/po/pt_BR.po index bac2c9661..50bea40ae 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-04-14 19:13+0200\n" +"POT-Creation-Date: 2024-05-01 10:08+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n" "Last-Translator: Érico Nogueira <ericonr@disroot.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -14413,6 +14413,10 @@ msgid "" "sent as irc tag); empty string = disable time in backlog messages" msgstr "" +msgid "" +"number of lines to retrieve on each buffer when connecting to a remote relay" +msgstr "" + #, fuzzy, c-format msgid "%s%s: invalid websocket handshake received for client %s%s%s" msgstr "%s%s: handshake TLS falhou" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-04-14 19:13+0200\n" +"POT-Creation-Date: 2024-05-01 10:08+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -14003,6 +14003,10 @@ msgid "" "sent as irc tag); empty string = disable time in backlog messages" msgstr "" +msgid "" +"number of lines to retrieve on each buffer when connecting to a remote relay" +msgstr "" + #, fuzzy, c-format msgid "%s%s: invalid websocket handshake received for client %s%s%s" msgstr "%s инициализация gnutls не удалось\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-04-14 19:13+0200\n" +"POT-Creation-Date: 2024-05-01 10:08+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n" "Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -15451,6 +15451,10 @@ msgstr "" "сервера, јер се време шаље као irc ознака); празан стринг = време је " "искључено у линијама старијих порука" +msgid "" +"number of lines to retrieve on each buffer when connecting to a remote relay" +msgstr "" + #, c-format msgid "%s%s: invalid websocket handshake received for client %s%s%s" msgstr "%s%s: примљено је неважеће вебсокет руковање од клијента %s%s%s" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-04-14 19:13+0200\n" +"POT-Creation-Date: 2024-05-01 10:08+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n" "Last-Translator: Emir SARI <emir_sari@icloud.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -15612,6 +15612,10 @@ msgstr "" "çünkü zaman irc etiketi olarak gönderilir); boş dizi = biriken günlük " "iletilerinde zamanı devre dışı bırak" +msgid "" +"number of lines to retrieve on each buffer when connecting to a remote relay" +msgstr "" + #, c-format msgid "%s%s: invalid websocket handshake received for client %s%s%s" msgstr "%s%s: %s%s%s istemcisi için geçersiz web soketi el sıkışması alındı" diff --git a/po/weechat.pot b/po/weechat.pot index 9b28a4607..a5ba89e5c 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-04-14 19:13+0200\n" +"POT-Creation-Date: 2024-05-01 10:08+0200\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" @@ -12765,6 +12765,10 @@ msgid "" "sent as irc tag); empty string = disable time in backlog messages" msgstr "" +msgid "" +"number of lines to retrieve on each buffer when connecting to a remote relay" +msgstr "" + #, c-format msgid "%s%s: invalid websocket handshake received for client %s%s%s" msgstr "" diff --git a/src/plugins/relay/api/remote/relay-remote-network.c b/src/plugins/relay/api/remote/relay-remote-network.c index 49433ee2e..12b05cd90 100644 --- a/src/plugins/relay/api/remote/relay-remote-network.c +++ b/src/plugins/relay/api/remote/relay-remote-network.c @@ -34,6 +34,7 @@ #include "../../../weechat-plugin.h" #include "../../relay.h" #include "../../relay-auth.h" +#include "../../relay-config.h" #include "../../relay-http.h" #include "../../relay-raw.h" #include "../../relay-remote.h" @@ -384,7 +385,8 @@ relay_remote_network_recv_text (struct t_relay_remote *remote, request, strlen (request)); snprintf (request, sizeof (request), "{\"request\": \"GET /api/buffers?" - "lines=-100&nicks=true&colors=weechat\"}"); + "lines=-%d&nicks=true&colors=weechat\"}", + weechat_config_integer (relay_config_api_remote_get_lines)); relay_remote_network_send (remote, RELAY_MSG_STANDARD, request, strlen (request)); } diff --git a/src/plugins/relay/relay-config.c b/src/plugins/relay/relay-config.c index dfd00ef57..f41af69e5 100644 --- a/src/plugins/relay/relay-config.c +++ b/src/plugins/relay/relay-config.c @@ -49,6 +49,7 @@ struct t_config_section *relay_config_section_look = NULL; struct t_config_section *relay_config_section_color = NULL; struct t_config_section *relay_config_section_network = NULL; struct t_config_section *relay_config_section_irc = NULL; +struct t_config_section *relay_config_section_api = NULL; struct t_config_section *relay_config_section_port = NULL; struct t_config_section *relay_config_section_path = NULL; struct t_config_section *relay_config_section_remote = NULL; @@ -100,6 +101,10 @@ struct t_config_option *relay_config_irc_backlog_since_last_message = NULL; struct t_config_option *relay_config_irc_backlog_tags = NULL; struct t_config_option *relay_config_irc_backlog_time_format = NULL; +/* relay config, api section */ + +struct t_config_option *relay_config_api_remote_get_lines = NULL; + /* other */ int relay_config_auto_open_buffer[RELAY_NUM_PROTOCOLS]; @@ -1795,6 +1800,26 @@ relay_config_init () NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); } + /* section api */ + relay_config_section_api = weechat_config_new_section ( + relay_config_file, "api", + 0, 0, + NULL, NULL, NULL, + NULL, NULL, NULL, + NULL, NULL, NULL, + NULL, NULL, NULL, + NULL, NULL, NULL); + if (relay_config_section_api) + { + relay_config_api_remote_get_lines = weechat_config_new_option ( + relay_config_file, relay_config_section_api, + "remote_get_lines", "integer", + N_("number of lines to retrieve on each buffer when connecting " + "to a remote relay"), + NULL, 0, INT_MAX, "1000", NULL, 0, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + } + /* section port */ relay_config_section_port = weechat_config_new_section ( relay_config_file, "port", diff --git a/src/plugins/relay/relay-config.h b/src/plugins/relay/relay-config.h index afc8afc96..f29956d8b 100644 --- a/src/plugins/relay/relay-config.h +++ b/src/plugins/relay/relay-config.h @@ -68,6 +68,8 @@ extern struct t_config_option *relay_config_irc_backlog_since_last_message; extern struct t_config_option *relay_config_irc_backlog_tags; extern struct t_config_option *relay_config_irc_backlog_time_format; +extern struct t_config_option *relay_config_api_remote_get_lines; + extern int relay_config_auto_open_buffer[]; extern int relay_config_display_clients[]; extern regex_t *relay_config_regex_allowed_ips; |