From ee2f09fb139392868367feb43f9356b3aa3b6a87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 12 Jun 2017 20:06:58 +0200 Subject: [PATCH] relay: add option "start" in command /relay --- ChangeLog.adoc | 1 + doc/de/autogen/user/relay_commands.adoc | 63 ++++++++++++------------ doc/en/autogen/user/relay_commands.adoc | 5 +- doc/fr/autogen/user/relay_commands.adoc | 5 +- doc/it/autogen/user/relay_commands.adoc | 5 +- doc/ja/autogen/user/relay_commands.adoc | 63 ++++++++++++------------ doc/pl/autogen/user/relay_commands.adoc | 65 +++++++++++++------------ po/cs.po | 9 ++-- po/de.po | 11 +++-- po/es.po | 9 ++-- po/fr.po | 18 ++++--- po/hu.po | 9 ++-- po/it.po | 9 ++-- po/ja.po | 11 +++-- po/pl.po | 11 +++-- po/pt.po | 11 +++-- po/pt_BR.po | 9 ++-- po/ru.po | 9 ++-- po/tr.po | 9 ++-- po/weechat.pot | 9 ++-- src/plugins/relay/relay-command.c | 28 +++++++++-- 21 files changed, 210 insertions(+), 159 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 765bc8256..850758857 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -32,6 +32,7 @@ Improvements:: * buflist: display a warning when the script "buffers.pl" is loaded * buflist: add support of char "~" in option buflist.look.sort for case insensitive comparison * buflist: add variable `${current_buffer}` (boolean "0" / "1") in bar item evaluation + * relay: add option "start" in command /relay * trigger: add "irc_server" and "irc_channel" pointers in data for IRC signal/modifier hooks Bug fixes:: diff --git a/doc/de/autogen/user/relay_commands.adoc b/doc/de/autogen/user/relay_commands.adoc index 597750160..568387882 100644 --- a/doc/de/autogen/user/relay_commands.adoc +++ b/doc/de/autogen/user/relay_commands.adoc @@ -8,50 +8,51 @@ ---- /relay list|listfull|listrelay add - del|stop|restart + del|start|restart|stop raw sslcertkey - list: Auflistung der Relay-Clients (nur aktive Relays) - listfull: detaillierte Auflistung der Relay-Clients (alle Relays) - listrelay: Auflistung der Relays (Name und Port) - add: fügt ein Relay, für ein Protokoll + Name, hinzu - del: entfernt Relay für ein Protokoll + Name - stop: schließt den Server Socket (Clients bleiben verbunden) - restart: beendet den Server Socket und lauscht erneut am Port (Clients bleiben verbunden) - name: Name des Relays (siehe Format weiter unten) - port: Port der für Relay genutzt werden soll - raw: öffnet einen Buffer mit Relay-Rohdaten - sslcertkey: setzt SSL Zertifikat/Schlüssel mittels Pfad in Einstellung relay.network.ssl_cert_key + list: list relay clients (only active relays) + listfull: list relay clients (verbose, all relays) + listrelay: list relays (name and port) + add: add a relay (listen on a port) + del: remove a relay (clients remain connected) + start: listen on port + restart: close the server socket and listen again on port (clients remain connected) + stop: close the server socket (clients remain connected) + name: relay name (see format below) + port: port used for relay + raw: open buffer with raw Relay data + sslcertkey: set SSL certificate/key using path in option relay.network.ssl_cert_key -Aufbau des Relay-Namens: [ipv4.][ipv6.][ssl.] - ipv4: erzwingt die Nutzung von IPv4 - ipv6: erzwingt die Nutzung von IPv6 - ssl: aktiviert SSL -protocol.name: Protokoll und Name relay: - - Protokoll "irc": Name des Servers welcher geteilt werden soll (optional. Falls kein Name angegeben wird, muss der Client einen Namen mit dem Befehl "PASS" übermitteln, das Format ist wie folgt: "PASS Server:Passwort") - - Protokoll "weechat" (es wird kein Name verwendet) +Relay name is: [ipv4.][ipv6.][ssl.] + ipv4: force use of IPv4 + ipv6: force use of IPv6 + ssl: enable SSL +protocol.name: protocol and name to relay: + - protocol "irc": name is the server to share (optional, if not given, the server name must be sent by client in command "PASS", with format: "PASS server:password") + - protocol "weechat" (name is not used) -Das "irc" Protokoll dient dazu eine Verbindung zu einem anderen IRC Client (oder zu einem zweiten WeeChat) herzustellen. -Das "weechat" Protokoll wird von einem Remote-Interface genutzt um eine Verbindung herzustellen. Siehe https://weechat.org/download/ +The "irc" protocol allows any IRC client (including WeeChat itself) to connect on the port. +The "weechat" protocol allows a remote interface to connect on the port, see the list here: https://weechat.org/download/ -Ohne Angabe von Argumenten werden alle Relay-Clients in einem neuen Buffer dargestellt. +Without argument, this command opens buffer with list of relay clients. -Beispiele: - IRC Proxy für Server "freenode": +Examples: + irc proxy, for server "freenode": /relay add irc.freenode 8000 - IRC Proxy, für Server "freenode", mit SSL: + irc proxy, for server "freenode", with SSL: /relay add ssl.irc.freenode 8001 - IRC Proxy für alle Server (Client wählt aus), mit SSL: + irc proxy, for all servers (client will choose), with SSL: /relay add ssl.irc 8002 - WeeChat Protokoll: + weechat protocol: /relay add weechat 9000 - WeeChat Protokoll, mit SSL: + weechat protocol with SSL: /relay add ssl.weechat 9001 - WeeChat Protokoll, mit SSL, nur IPv4 nutzen: + weechat protocol with SSL, using only IPv4: /relay add ipv4.ssl.weechat 9001 - WeeChat Protokoll, mit SSL, nur IPv6 nutzen: + weechat protocol with SSL, using only IPv6: /relay add ipv6.ssl.weechat 9001 - WeeChat Protokoll, mit SSL, mit IPv4 + IPv6: + weechat protocol with SSL, using IPv4 + IPv6: /relay add ipv4.ipv6.ssl.weechat 9001 ---- diff --git a/doc/en/autogen/user/relay_commands.adoc b/doc/en/autogen/user/relay_commands.adoc index 6697e4de8..af26c07b1 100644 --- a/doc/en/autogen/user/relay_commands.adoc +++ b/doc/en/autogen/user/relay_commands.adoc @@ -8,7 +8,7 @@ ---- /relay list|listfull|listrelay add - del|stop|restart + del|start|restart|stop raw sslcertkey @@ -17,8 +17,9 @@ listrelay: list relays (name and port) add: add a relay (listen on a port) del: remove a relay (clients remain connected) - stop: close the server socket (clients remain connected) + start: listen on port restart: close the server socket and listen again on port (clients remain connected) + stop: close the server socket (clients remain connected) name: relay name (see format below) port: port used for relay raw: open buffer with raw Relay data diff --git a/doc/fr/autogen/user/relay_commands.adoc b/doc/fr/autogen/user/relay_commands.adoc index 767f9c96c..0b31cce4e 100644 --- a/doc/fr/autogen/user/relay_commands.adoc +++ b/doc/fr/autogen/user/relay_commands.adoc @@ -8,7 +8,7 @@ ---- /relay list|listfull|listrelay add - del|stop|restart + del|start|restart|stop raw sslcertkey @@ -17,8 +17,9 @@ listrelay : lister les relais (nom et port) add : ajouter un relai (écouter sur un port) del : supprimer un relai (les clients restent connectés) - stop : fermer le socket serveur (les clients restent connectés) + start : écouter sur le port restart : fermer le socket serveur et écouter à nouveau sur le port (les clients restent connectés) + stop : fermer le socket serveur (les clients restent connectés) nom : nom du relai (voir le format ci-dessous) port : port utilisé pour le relai raw : ouvrir le tampon avec les données brutes Relay diff --git a/doc/it/autogen/user/relay_commands.adoc b/doc/it/autogen/user/relay_commands.adoc index d092a4ab6..535e294c8 100644 --- a/doc/it/autogen/user/relay_commands.adoc +++ b/doc/it/autogen/user/relay_commands.adoc @@ -8,7 +8,7 @@ ---- /relay list|listfull|listrelay add - del|stop|restart + del|start|restart|stop raw sslcertkey @@ -17,8 +17,9 @@ listrelay: list relays (name and port) add: add a relay (listen on a port) del: remove a relay (clients remain connected) - stop: close the server socket (clients remain connected) + start: listen on port restart: close the server socket and listen again on port (clients remain connected) + stop: close the server socket (clients remain connected) name: relay name (see format below) port: port used for relay raw: open buffer with raw Relay data diff --git a/doc/ja/autogen/user/relay_commands.adoc b/doc/ja/autogen/user/relay_commands.adoc index 31b642315..0cae7d765 100644 --- a/doc/ja/autogen/user/relay_commands.adoc +++ b/doc/ja/autogen/user/relay_commands.adoc @@ -8,50 +8,51 @@ ---- /relay list|listfull|listrelay add - del|stop|restart + del|start|restart|stop raw sslcertkey - list: リレーするクライアントをリストアップ (アクティブなもののみ) - listfull: リレーするクライアントをリストアップ (詳細、全てのリレー) - listrelay: リレーをリストアップ (名前とポート番号) - add: リレーを追加 (ポートで接続を待ち受ける) - del: リレーを削除 (クライアントとの接続は保持) - stop: サーバソケットを閉じる (クライアントとの接続は保持) - restart: サーバソケットを閉じて同じポートで接続を待つ (クライアントとの接続は保持) - name: リレー名 (以下の書式を参照) - port: リレーが使うポートの番号 - raw: 生リレーデータを表示するバッファを開く - sslcertkey: オプション relay.network.ssl_cert_key のパスを使って SSL 証明書/鍵を指定 + list: list relay clients (only active relays) + listfull: list relay clients (verbose, all relays) + listrelay: list relays (name and port) + add: add a relay (listen on a port) + del: remove a relay (clients remain connected) + start: listen on port + restart: close the server socket and listen again on port (clients remain connected) + stop: close the server socket (clients remain connected) + name: relay name (see format below) + port: port used for relay + raw: open buffer with raw Relay data + sslcertkey: set SSL certificate/key using path in option relay.network.ssl_cert_key -リレー名の書式: [ipv4.][ipv6.][ssl.] - ipv4: IPv4 を強制的に利用 - ipv6: IPv6 を強制的に利用 - ssl: SSL を有効化 -protocol.name: リレーするプロトコルと名前: - - "irc" プロトコル: name は共有するサーバ名 (任意指定、指定しない場合、サーバ名は "PASS" コマンドでクライアントが送信するものと同じでなければいけません、"PASS" コマンドの書式は "PASS server:password") - - "weechat" プロトコル (name は使われません) +Relay name is: [ipv4.][ipv6.][ssl.] + ipv4: force use of IPv4 + ipv6: force use of IPv6 + ssl: enable SSL +protocol.name: protocol and name to relay: + - protocol "irc": name is the server to share (optional, if not given, the server name must be sent by client in command "PASS", with format: "PASS server:password") + - protocol "weechat" (name is not used) -"irc" プロトコルを指定した場合、どんな IRC クライアント (WeeChat 自身を含めて) でもポートに接続することができます。 -"weechat" プロトコルを指定した場合、リモートインターフェイスを使ってポートに接続することができます、参照: https://weechat.org/download/ +The "irc" protocol allows any IRC client (including WeeChat itself) to connect on the port. +The "weechat" protocol allows a remote interface to connect on the port, see the list here: https://weechat.org/download/ -引数無しの場合、リレークライアントのリストを含むバッファを開く +Without argument, this command opens buffer with list of relay clients. -例: - サーバ "freenode" に対する irc プロキシを設定: +Examples: + irc proxy, for server "freenode": /relay add irc.freenode 8000 - サーバ "freenode" に対する SSL を有効化した irc プロキシを設定: + irc proxy, for server "freenode", with SSL: /relay add ssl.irc.freenode 8001 - SSL を有効化してすべてのサーバに対する irc プロキシを設定 (クライアントがサーバを選ぶ): + irc proxy, for all servers (client will choose), with SSL: /relay add ssl.irc 8002 - weechat プロトコル: + weechat protocol: /relay add weechat 9000 - SSL を有効化した weechat プロトコル: + weechat protocol with SSL: /relay add ssl.weechat 9001 - SSL を有効にした weechat プロトコル、IPv4 だけを利用: + weechat protocol with SSL, using only IPv4: /relay add ipv4.ssl.weechat 9001 - SSL を有効にした weechat プロトコル、IPv6 だけを利用: + weechat protocol with SSL, using only IPv6: /relay add ipv6.ssl.weechat 9001 - SSL を有効にした weechat プロトコル、IPv4 と IPv6 を利用: + weechat protocol with SSL, using IPv4 + IPv6: /relay add ipv4.ipv6.ssl.weechat 9001 ---- diff --git a/doc/pl/autogen/user/relay_commands.adoc b/doc/pl/autogen/user/relay_commands.adoc index dc3384547..f43f81689 100644 --- a/doc/pl/autogen/user/relay_commands.adoc +++ b/doc/pl/autogen/user/relay_commands.adoc @@ -7,51 +7,52 @@ ---- /relay list|listfull|listrelay - add - del|stop|restart + add + del|start|restart|stop raw sslcertkey - list: wyświetla klienty pośrednika (tylko aktywne) - listfull: wyświetla klienty pośrednika (wszystkie) - listrelay: wyświetla pośredników (nazwa i port) - add: dodaje relay (nasłuchuje na porcie) - del: usuwa relay (klienty zostają połączone) - stop: zamyka gniazdo serwera (klienty zostają połączone) - restart: zamyka porta serwera i otwiera go ponownie nasłuchując na nim (klienty zostają połączone) - nazwa: nazwa pośrednika (format poniżej) - port: port używany przez pośrednika - raw: otwiera bufor z nieprzetworzonymi danymi pośrednika - kluczSSL: ustawia certyfikat SSL/hasło używając ścieżki w opcji relay.network.ssl_cert_key + list: list relay clients (only active relays) + listfull: list relay clients (verbose, all relays) + listrelay: list relays (name and port) + add: add a relay (listen on a port) + del: remove a relay (clients remain connected) + start: listen on port + restart: close the server socket and listen again on port (clients remain connected) + stop: close the server socket (clients remain connected) + name: relay name (see format below) + port: port used for relay + raw: open buffer with raw Relay data + sslcertkey: set SSL certificate/key using path in option relay.network.ssl_cert_key -Nazwa pośrednika to: [ipv4.][ipv6.][ssl.] - ipv4: wymusza użycie IPv4 - ipv6: wymusza użycie IPv6 - ssl: włącza SSL -protokół.nazwa: protokół i nazwa do przekazywania: - - protokół "irc": nazwą jest serwer do współdzielenia (opcjonalne, jeśli nie podane, nazwa serwera musi być wysłana przez klienta w komendzie "PASS", format: "PASS serwer:hasło") - - protokół "weechat" (nazwa nie jest używana) +Relay name is: [ipv4.][ipv6.][ssl.] + ipv4: force use of IPv4 + ipv6: force use of IPv6 + ssl: enable SSL +protocol.name: protocol and name to relay: + - protocol "irc": name is the server to share (optional, if not given, the server name must be sent by client in command "PASS", with format: "PASS server:password") + - protocol "weechat" (name is not used) -Protokół "irc" pozwala dowolnemu klientowi IRC (włączajac w to WeeChat) połączyć się na ustawionym porcie. -Protokół "weechat" pozwala na połączenie się zdalnym interfejsem, lista dostępna pod adresem: https://weechat.org/download/ +The "irc" protocol allows any IRC client (including WeeChat itself) to connect on the port. +The "weechat" protocol allows a remote interface to connect on the port, see the list here: https://weechat.org/download/ -Bez argumentu komenda otwiera bufor z listą klientów. +Without argument, this command opens buffer with list of relay clients. -Przykłady: - pośrednik irc dla serwera "freenode": +Examples: + irc proxy, for server "freenode": /relay add irc.freenode 8000 - pośrednik irc dla serwera "freenode", z SSL: + irc proxy, for server "freenode", with SSL: /relay add ssl.irc.freenode 8001 - pośrednik irc dla wszystkich serwerów (klient wybiera) z SSL: + irc proxy, for all servers (client will choose), with SSL: /relay add ssl.irc 8002 - protokół weechat: + weechat protocol: /relay add weechat 9000 - protokół weechat z SSL: + weechat protocol with SSL: /relay add ssl.weechat 9001 - protokół weechat z SSL, używający tylko IPv4: + weechat protocol with SSL, using only IPv4: /relay add ipv4.ssl.weechat 9001 - protokół weechat z SSL, używający tylko IPv6: + weechat protocol with SSL, using only IPv6: /relay add ipv6.ssl.weechat 9001 - protokół weechat z SSL, używający IPv4 + IPv6: + weechat protocol with SSL, using IPv4 + IPv6: /relay add ipv4.ipv6.ssl.weechat 9001 ---- diff --git a/po/cs.po b/po/cs.po index 7302ee576..10d805031 100644 --- a/po/cs.po +++ b/po/cs.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-06-08 06:42+0200\n" +"POT-Creation-Date: 2017-06-12 19:59+0200\n" "PO-Revision-Date: 2017-05-13 22:06+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -9895,8 +9895,8 @@ msgstr "ovládání přesměrování" #, fuzzy msgid "" -"list|listfull|listrelay || add || del|stop|restart || " -"raw || sslcertkey" +"list|listfull|listrelay || add || del|start|restart|stop " +" || raw || sslcertkey" msgstr "" "list|listfull|listrelay || add || del " "|| raw" @@ -9908,9 +9908,10 @@ msgid "" " listrelay: list relays (name and port)\n" " add: add a relay (listen on a port)\n" " del: remove a relay (clients remain connected)\n" -" stop: close the server socket (clients remain connected)\n" +" start: listen on port\n" " restart: close the server socket and listen again on port (clients " "remain connected)\n" +" stop: close the server socket (clients remain connected)\n" " name: relay name (see format below)\n" " port: port used for relay\n" " raw: open buffer with raw Relay data\n" diff --git a/po/de.po b/po/de.po index ffb0dad01..56faa7565 100644 --- a/po/de.po +++ b/po/de.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-06-08 06:42+0200\n" +"POT-Creation-Date: 2017-06-12 19:59+0200\n" "PO-Revision-Date: 2017-06-09 22:32+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -11412,22 +11412,25 @@ msgstr "%s%s: Relay \"%s\" nicht gefunden" msgid "relay control" msgstr "Relay-Kontrolle" +#, fuzzy msgid "" -"list|listfull|listrelay || add || del|stop|restart || " -"raw || sslcertkey" +"list|listfull|listrelay || add || del|start|restart|stop " +" || raw || sslcertkey" msgstr "" "list|listfull|listrelay || add || del|stop|restart || " "raw || sslcertkey" +#, fuzzy msgid "" " list: list relay clients (only active relays)\n" " listfull: list relay clients (verbose, all relays)\n" " listrelay: list relays (name and port)\n" " add: add a relay (listen on a port)\n" " del: remove a relay (clients remain connected)\n" -" stop: close the server socket (clients remain connected)\n" +" start: listen on port\n" " restart: close the server socket and listen again on port (clients " "remain connected)\n" +" stop: close the server socket (clients remain connected)\n" " name: relay name (see format below)\n" " port: port used for relay\n" " raw: open buffer with raw Relay data\n" diff --git a/po/es.po b/po/es.po index 567cafedc..56a7a7aec 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-06-08 06:42+0200\n" +"POT-Creation-Date: 2017-06-12 19:59+0200\n" "PO-Revision-Date: 2017-01-06 22:01+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -10221,8 +10221,8 @@ msgstr "control de retransmisión" #, fuzzy msgid "" -"list|listfull|listrelay || add || del|stop|restart || " -"raw || sslcertkey" +"list|listfull|listrelay || add || del|start|restart|stop " +" || raw || sslcertkey" msgstr "" "list|listfull|listrelay || add || del || raw || sslcertkey" @@ -10234,9 +10234,10 @@ msgid "" " listrelay: list relays (name and port)\n" " add: add a relay (listen on a port)\n" " del: remove a relay (clients remain connected)\n" -" stop: close the server socket (clients remain connected)\n" +" start: listen on port\n" " restart: close the server socket and listen again on port (clients " "remain connected)\n" +" stop: close the server socket (clients remain connected)\n" " name: relay name (see format below)\n" " port: port used for relay\n" " raw: open buffer with raw Relay data\n" diff --git a/po/fr.po b/po/fr.po index 4dc0e5b00..cf8d2a4bc 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-06-08 06:42+0200\n" -"PO-Revision-Date: 2017-06-08 06:45+0200\n" +"POT-Creation-Date: 2017-06-12 19:59+0200\n" +"PO-Revision-Date: 2017-06-12 20:01+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -11160,11 +11160,11 @@ msgid "relay control" msgstr "contrôle du relai" msgid "" -"list|listfull|listrelay || add || del|stop|restart || " -"raw || sslcertkey" +"list|listfull|listrelay || add || del|start|restart|stop " +" || raw || sslcertkey" msgstr "" -"list|listfull|listrelay || add || del|stop|restart || raw " -"|| sslcertkey" +"list|listfull|listrelay || add || del|start|restart|stop " +"|| raw || sslcertkey" msgid "" " list: list relay clients (only active relays)\n" @@ -11172,9 +11172,10 @@ msgid "" " listrelay: list relays (name and port)\n" " add: add a relay (listen on a port)\n" " del: remove a relay (clients remain connected)\n" -" stop: close the server socket (clients remain connected)\n" +" start: listen on port\n" " restart: close the server socket and listen again on port (clients " "remain connected)\n" +" stop: close the server socket (clients remain connected)\n" " name: relay name (see format below)\n" " port: port used for relay\n" " raw: open buffer with raw Relay data\n" @@ -11221,9 +11222,10 @@ msgstr "" " listrelay : lister les relais (nom et port)\n" " add : ajouter un relai (écouter sur un port)\n" " del : supprimer un relai (les clients restent connectés)\n" -" stop : fermer le socket serveur (les clients restent connectés)\n" +" start : écouter sur le port\n" " restart : fermer le socket serveur et écouter à nouveau sur le port (les " "clients restent connectés)\n" +" stop : fermer le socket serveur (les clients restent connectés)\n" " nom : nom du relai (voir le format ci-dessous)\n" " port : port utilisé pour le relai\n" " raw : ouvrir le tampon avec les données brutes Relay\n" diff --git a/po/hu.po b/po/hu.po index 0612c85d9..8fe2b97fe 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-06-08 06:42+0200\n" +"POT-Creation-Date: 2017-06-12 19:59+0200\n" "PO-Revision-Date: 2017-01-06 22:03+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -9269,8 +9269,8 @@ msgid "relay control" msgstr "" msgid "" -"list|listfull|listrelay || add || del|stop|restart || " -"raw || sslcertkey" +"list|listfull|listrelay || add || del|start|restart|stop " +" || raw || sslcertkey" msgstr "" msgid "" @@ -9279,9 +9279,10 @@ msgid "" " listrelay: list relays (name and port)\n" " add: add a relay (listen on a port)\n" " del: remove a relay (clients remain connected)\n" -" stop: close the server socket (clients remain connected)\n" +" start: listen on port\n" " restart: close the server socket and listen again on port (clients " "remain connected)\n" +" stop: close the server socket (clients remain connected)\n" " name: relay name (see format below)\n" " port: port used for relay\n" " raw: open buffer with raw Relay data\n" diff --git a/po/it.po b/po/it.po index 125745363..84d971aa8 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-06-08 06:42+0200\n" +"POT-Creation-Date: 2017-06-12 19:59+0200\n" "PO-Revision-Date: 2017-01-06 22:04+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -10416,8 +10416,8 @@ msgstr "controllo relay" #, fuzzy msgid "" -"list|listfull|listrelay || add || del|stop|restart || " -"raw || sslcertkey" +"list|listfull|listrelay || add || del|start|restart|stop " +" || raw || sslcertkey" msgstr "" "list|listfull|listrelay || add [ipv4.][ipv6.][ssl.] " "|| del [ipv4.][ipv6.][ssl.] || raw || sslcertkey" @@ -10429,9 +10429,10 @@ msgid "" " listrelay: list relays (name and port)\n" " add: add a relay (listen on a port)\n" " del: remove a relay (clients remain connected)\n" -" stop: close the server socket (clients remain connected)\n" +" start: listen on port\n" " restart: close the server socket and listen again on port (clients " "remain connected)\n" +" stop: close the server socket (clients remain connected)\n" " name: relay name (see format below)\n" " port: port used for relay\n" " raw: open buffer with raw Relay data\n" diff --git a/po/ja.po b/po/ja.po index 81f23482d..b5d6a803b 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-06-08 06:42+0200\n" +"POT-Creation-Date: 2017-06-12 19:59+0200\n" "PO-Revision-Date: 2017-06-10 09:00+0900\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese || del|stop|restart || " -"raw || sslcertkey" +"list|listfull|listrelay || add || del|start|restart|stop " +" || raw || sslcertkey" msgstr "" "list|listfull|listrelay || add || del|stop|restart || " "raw || sslcertkey" +#, fuzzy msgid "" " list: list relay clients (only active relays)\n" " listfull: list relay clients (verbose, all relays)\n" " listrelay: list relays (name and port)\n" " add: add a relay (listen on a port)\n" " del: remove a relay (clients remain connected)\n" -" stop: close the server socket (clients remain connected)\n" +" start: listen on port\n" " restart: close the server socket and listen again on port (clients " "remain connected)\n" +" stop: close the server socket (clients remain connected)\n" " name: relay name (see format below)\n" " port: port used for relay\n" " raw: open buffer with raw Relay data\n" diff --git a/po/pl.po b/po/pl.po index cc07a16c5..0a3f72840 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-06-08 06:42+0200\n" +"POT-Creation-Date: 2017-06-12 19:59+0200\n" "PO-Revision-Date: 2017-04-08 14:49+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -10918,22 +10918,25 @@ msgstr "%s%s: relay \"%s\" nie został znaleziony" msgid "relay control" msgstr "zarządzanie przesyłaniem" +#, fuzzy msgid "" -"list|listfull|listrelay || add || del|stop|restart || " -"raw || sslcertkey" +"list|listfull|listrelay || add || del|start|restart|stop " +" || raw || sslcertkey" msgstr "" "list|listfull|listrelay || add || del|stop|restart || " "raw || sslcertkey" +#, fuzzy msgid "" " list: list relay clients (only active relays)\n" " listfull: list relay clients (verbose, all relays)\n" " listrelay: list relays (name and port)\n" " add: add a relay (listen on a port)\n" " del: remove a relay (clients remain connected)\n" -" stop: close the server socket (clients remain connected)\n" +" start: listen on port\n" " restart: close the server socket and listen again on port (clients " "remain connected)\n" +" stop: close the server socket (clients remain connected)\n" " name: relay name (see format below)\n" " port: port used for relay\n" " raw: open buffer with raw Relay data\n" diff --git a/po/pt.po b/po/pt.po index d56e1d7bf..a33ff172c 100644 --- a/po/pt.po +++ b/po/pt.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-06-08 06:42+0200\n" +"POT-Creation-Date: 2017-06-12 19:59+0200\n" "PO-Revision-Date: 2017-04-08 14:50+0200\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -10823,22 +10823,25 @@ msgstr "%s%s: relay \"%s\" não encontrado" msgid "relay control" msgstr "controlo de reencaminhamento" +#, fuzzy msgid "" -"list|listfull|listrelay || add || del|stop|restart || " -"raw || sslcertkey" +"list|listfull|listrelay || add || del|start|restart|stop " +" || raw || sslcertkey" msgstr "" "list|listfull|listrelay || add || del|stop|restart || " "raw || sslcertkey" +#, fuzzy msgid "" " list: list relay clients (only active relays)\n" " listfull: list relay clients (verbose, all relays)\n" " listrelay: list relays (name and port)\n" " add: add a relay (listen on a port)\n" " del: remove a relay (clients remain connected)\n" -" stop: close the server socket (clients remain connected)\n" +" start: listen on port\n" " restart: close the server socket and listen again on port (clients " "remain connected)\n" +" stop: close the server socket (clients remain connected)\n" " name: relay name (see format below)\n" " port: port used for relay\n" " raw: open buffer with raw Relay data\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index 242640278..732b13182 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: 2017-06-08 06:42+0200\n" +"POT-Creation-Date: 2017-06-12 19:59+0200\n" "PO-Revision-Date: 2016-09-03 08:24+0200\n" "Last-Translator: Eduardo Elias \n" "Language-Team: weechat-dev \n" @@ -9738,8 +9738,8 @@ msgid "relay control" msgstr "" msgid "" -"list|listfull|listrelay || add || del|stop|restart || " -"raw || sslcertkey" +"list|listfull|listrelay || add || del|start|restart|stop " +" || raw || sslcertkey" msgstr "" msgid "" @@ -9748,9 +9748,10 @@ msgid "" " listrelay: list relays (name and port)\n" " add: add a relay (listen on a port)\n" " del: remove a relay (clients remain connected)\n" -" stop: close the server socket (clients remain connected)\n" +" start: listen on port\n" " restart: close the server socket and listen again on port (clients " "remain connected)\n" +" stop: close the server socket (clients remain connected)\n" " name: relay name (see format below)\n" " port: port used for relay\n" " raw: open buffer with raw Relay data\n" diff --git a/po/ru.po b/po/ru.po index 621da81ab..d873444bf 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-06-08 06:42+0200\n" +"POT-Creation-Date: 2017-06-12 19:59+0200\n" "PO-Revision-Date: 2017-01-06 22:06+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -9306,8 +9306,8 @@ msgid "relay control" msgstr "" msgid "" -"list|listfull|listrelay || add || del|stop|restart || " -"raw || sslcertkey" +"list|listfull|listrelay || add || del|start|restart|stop " +" || raw || sslcertkey" msgstr "" msgid "" @@ -9316,9 +9316,10 @@ msgid "" " listrelay: list relays (name and port)\n" " add: add a relay (listen on a port)\n" " del: remove a relay (clients remain connected)\n" -" stop: close the server socket (clients remain connected)\n" +" start: listen on port\n" " restart: close the server socket and listen again on port (clients " "remain connected)\n" +" stop: close the server socket (clients remain connected)\n" " name: relay name (see format below)\n" " port: port used for relay\n" " raw: open buffer with raw Relay data\n" diff --git a/po/tr.po b/po/tr.po index 21a3612be..9c0618792 100644 --- a/po/tr.po +++ b/po/tr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-06-08 06:42+0200\n" +"POT-Creation-Date: 2017-06-12 19:59+0200\n" "PO-Revision-Date: 2017-01-06 22:07+0100\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -8409,8 +8409,8 @@ msgid "relay control" msgstr "" msgid "" -"list|listfull|listrelay || add || del|stop|restart || " -"raw || sslcertkey" +"list|listfull|listrelay || add || del|start|restart|stop " +" || raw || sslcertkey" msgstr "" msgid "" @@ -8419,9 +8419,10 @@ msgid "" " listrelay: list relays (name and port)\n" " add: add a relay (listen on a port)\n" " del: remove a relay (clients remain connected)\n" -" stop: close the server socket (clients remain connected)\n" +" start: listen on port\n" " restart: close the server socket and listen again on port (clients " "remain connected)\n" +" stop: close the server socket (clients remain connected)\n" " name: relay name (see format below)\n" " port: port used for relay\n" " raw: open buffer with raw Relay data\n" diff --git a/po/weechat.pot b/po/weechat.pot index 8b7e40071..170e4116f 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: 2017-06-08 06:42+0200\n" +"POT-Creation-Date: 2017-06-12 19:59+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -8331,8 +8331,8 @@ msgid "relay control" msgstr "" msgid "" -"list|listfull|listrelay || add || del|stop|restart || " -"raw || sslcertkey" +"list|listfull|listrelay || add || del|start|restart|stop " +" || raw || sslcertkey" msgstr "" msgid "" @@ -8341,9 +8341,10 @@ msgid "" " listrelay: list relays (name and port)\n" " add: add a relay (listen on a port)\n" " del: remove a relay (clients remain connected)\n" -" stop: close the server socket (clients remain connected)\n" +" start: listen on port\n" " restart: close the server socket and listen again on port (clients " "remain connected)\n" +" stop: close the server socket (clients remain connected)\n" " name: relay name (see format below)\n" " port: port used for relay\n" " raw: open buffer with raw Relay data\n" diff --git a/src/plugins/relay/relay-command.c b/src/plugins/relay/relay-command.c index 2194cedcb..450187c3e 100644 --- a/src/plugins/relay/relay-command.c +++ b/src/plugins/relay/relay-command.c @@ -282,6 +282,26 @@ relay_command_relay (const void *pointer, void *data, return WEECHAT_RC_OK; } + if (weechat_strcasecmp (argv[1], "start") == 0) + { + WEECHAT_COMMAND_MIN_ARGS(3, "start"); + ptr_server = relay_server_search (argv_eol[2]); + if (ptr_server) + { + if (ptr_server->sock < 0) + relay_server_create_socket (ptr_server); + } + else + { + weechat_printf (NULL, + _("%s%s: relay \"%s\" not found"), + weechat_prefix ("error"), + RELAY_PLUGIN_NAME, + argv_eol[2]); + } + return WEECHAT_RC_OK; + } + if (weechat_strcasecmp (argv[1], "restart") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "restart"); @@ -362,7 +382,7 @@ relay_command_init () N_("relay control"), N_("list|listfull|listrelay" " || add " - " || del|stop|restart " + " || del|start|restart|stop " " || raw" " || sslcertkey"), N_(" list: list relay clients (only active relays)\n" @@ -370,9 +390,10 @@ relay_command_init () " listrelay: list relays (name and port)\n" " add: add a relay (listen on a port)\n" " del: remove a relay (clients remain connected)\n" - " stop: close the server socket (clients remain connected)\n" + " start: listen on port\n" " restart: close the server socket and listen again on port " "(clients remain connected)\n" + " stop: close the server socket (clients remain connected)\n" " name: relay name (see format below)\n" " port: port used for relay\n" " raw: open buffer with raw Relay data\n" @@ -419,8 +440,9 @@ relay_command_init () " || listrelay" " || add %(relay_protocol_name) %(relay_free_port)" " || del %(relay_relays)" - " || stop %(relay_relays)" + " || start %(relay_relays)" " || restart %(relay_relays)" + " || stop %(relay_relays)" " || raw" " || sslcertkey", &relay_command_relay, NULL, NULL);