diff options
-rw-r--r-- | doc/de/includes/autogen_user_commands.de.adoc | 27 | ||||
-rw-r--r-- | doc/en/includes/autogen_user_commands.en.adoc | 11 | ||||
-rw-r--r-- | doc/fr/includes/autogen_user_commands.fr.adoc | 11 | ||||
-rw-r--r-- | doc/it/includes/autogen_user_commands.it.adoc | 11 | ||||
-rw-r--r-- | doc/ja/includes/autogen_user_commands.ja.adoc | 27 | ||||
-rw-r--r-- | doc/pl/includes/autogen_user_commands.pl.adoc | 27 | ||||
-rw-r--r-- | doc/sr/includes/autogen_user_commands.sr.adoc | 27 | ||||
-rw-r--r-- | po/cs.po | 19 | ||||
-rw-r--r-- | po/de.po | 20 | ||||
-rw-r--r-- | po/es.po | 19 | ||||
-rw-r--r-- | po/fr.po | 30 | ||||
-rw-r--r-- | po/hu.po | 18 | ||||
-rw-r--r-- | po/it.po | 19 | ||||
-rw-r--r-- | po/ja.po | 20 | ||||
-rw-r--r-- | po/pl.po | 20 | ||||
-rw-r--r-- | po/pt.po | 19 | ||||
-rw-r--r-- | po/pt_BR.po | 18 | ||||
-rw-r--r-- | po/ru.po | 18 | ||||
-rw-r--r-- | po/sr.po | 20 | ||||
-rw-r--r-- | po/tr.po | 18 | ||||
-rw-r--r-- | po/weechat.pot | 17 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 30 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.h | 2 | ||||
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 53 | ||||
-rw-r--r-- | tests/unit/plugins/irc/test-irc-protocol.cpp | 50 |
25 files changed, 473 insertions, 78 deletions
diff --git a/doc/de/includes/autogen_user_commands.de.adoc b/doc/de/includes/autogen_user_commands.de.adoc index a6c0a9c4b..d25c7b5cc 100644 --- a/doc/de/includes/autogen_user_commands.de.adoc +++ b/doc/de/includes/autogen_user_commands.de.adoc @@ -121,19 +121,19 @@ Ohne Angabe von Argumenten wird die Ban-Liste für den aktuellen Kanal angezeigt req|ack [<capability> [<capability>...]] end - ls: führt alle Fähigkeiten auf die vom Server unterstützt werden - list: führt alle Fähigkeiten auf die aktuell genutzt werden - req: fordert eine Fähigkeit an - ack: bestätigt eine Fähigkeit die von Serverseite eine Bestätigung erfordert - end: beendet die Übertragung von Fähigkeiten + ls: list the capabilities supported by the server + list: list the capabilities currently enabled + req: request a capability + ack: acknowledge capabilities which require client-side acknowledgement + end: end the capability negotiation -Ohne Angaben von Argumenten werden "ls" und "list" gesendet. +Without argument, "ls" and "list" are sent. -Fähigkeiten die von WeeChat unterstützt werden: account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, multi-prefix, server-time, userhost-in-names. +Capabilities supported by WeeChat are: account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, multi-prefix, server-time, setname, userhost-in-names. -Fähigkeiten die standardmäßig genutzt werden sollen, können mit der Option irc.server_default.capabilities gesetzt werden (oder individuell für jeden Server mit der Option irc.server.xxx.capabilities). +The capabilities to automatically enable on servers can be set in option irc.server_default.capabilities (or by server in option irc.server.xxx.capabilities). -Beispiele: +Examples: /cap /cap req multi-prefix away-notify ---- @@ -808,6 +808,15 @@ mask: nur zutreffende Services auflisten type: nur Services von diesem Typ auflisten ---- +[[command_irc_setname]] +* `+setname+`: set real name + +---- +/setname <realname> + +realname: new real name +---- + [[command_irc_squery]] * `+squery+`: Nachricht an einen Service senden diff --git a/doc/en/includes/autogen_user_commands.en.adoc b/doc/en/includes/autogen_user_commands.en.adoc index 9bea33484..d57a06ffd 100644 --- a/doc/en/includes/autogen_user_commands.en.adoc +++ b/doc/en/includes/autogen_user_commands.en.adoc @@ -129,7 +129,7 @@ Without argument, this command displays the ban list for current channel. Without argument, "ls" and "list" are sent. -Capabilities supported by WeeChat are: account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, multi-prefix, server-time, userhost-in-names. +Capabilities supported by WeeChat are: account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, multi-prefix, server-time, setname, userhost-in-names. The capabilities to automatically enable on servers can be set in option irc.server_default.capabilities (or by server in option irc.server.xxx.capabilities). @@ -808,6 +808,15 @@ mask: list only services matching this mask type: list only services of this type ---- +[[command_irc_setname]] +* `+setname+`: set real name + +---- +/setname <realname> + +realname: new real name +---- + [[command_irc_squery]] * `+squery+`: deliver a message to a service diff --git a/doc/fr/includes/autogen_user_commands.fr.adoc b/doc/fr/includes/autogen_user_commands.fr.adoc index 046e90fa4..e664f357d 100644 --- a/doc/fr/includes/autogen_user_commands.fr.adoc +++ b/doc/fr/includes/autogen_user_commands.fr.adoc @@ -129,7 +129,7 @@ Sans paramètre, cette commande affiche la liste des bannissements pour le canal Sans paramètre, "ls" et "list" sont envoyés. -Les capacités supportées par WeeChat sont : account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, multi-prefix, server-time, userhost-in-names. +Les capacités supportées par WeeChat sont : account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, multi-prefix, server-time, setname, userhost-in-names. Les capacités à activer automatiquement sur les serveurs peuvent être définies dans l'option irc.server_default.capabilities (ou par serveur dans l'option irc.server.xxx.capabilities). @@ -808,6 +808,15 @@ masque : lister seulement les services qui correspondent à ce masque type : lister seulement les services de ce type ---- +[[command_irc_setname]] +* `+setname+`: définir le nom réel + +---- +/setname <nom_réel> + +nom_réel : nouveau nom réel +---- + [[command_irc_squery]] * `+squery+`: envoyer un message à un service diff --git a/doc/it/includes/autogen_user_commands.it.adoc b/doc/it/includes/autogen_user_commands.it.adoc index 6728a5c2f..bd7ee1ea1 100644 --- a/doc/it/includes/autogen_user_commands.it.adoc +++ b/doc/it/includes/autogen_user_commands.it.adoc @@ -129,7 +129,7 @@ Without argument, this command displays the ban list for current channel. Without argument, "ls" and "list" are sent. -Capabilities supported by WeeChat are: account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, multi-prefix, server-time, userhost-in-names. +Capabilities supported by WeeChat are: account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, multi-prefix, server-time, setname, userhost-in-names. The capabilities to automatically enable on servers can be set in option irc.server_default.capabilities (or by server in option irc.server.xxx.capabilities). @@ -808,6 +808,15 @@ mask: elenca solo i servizi che corrispondono a questa mask tipo: elenca solo i servizi di questo tipo ---- +[[command_irc_setname]] +* `+setname+`: set real name + +---- +/setname <realname> + +realname: new real name +---- + [[command_irc_squery]] * `+squery+`: invia un messaggio ad un servizio diff --git a/doc/ja/includes/autogen_user_commands.ja.adoc b/doc/ja/includes/autogen_user_commands.ja.adoc index ab3604680..a4a793668 100644 --- a/doc/ja/includes/autogen_user_commands.ja.adoc +++ b/doc/ja/includes/autogen_user_commands.ja.adoc @@ -121,19 +121,19 @@ channel: チャンネル名 req|ack [<capability> [<capability>...]] end - ls: サーバがサポートする機能をリスト - list: 現在有効化されている機能をリスト - req: 機能情報を要求 - ack: クライアント側に承認を要求する機能を承認 - end: 機能情報交換を終了 + ls: list the capabilities supported by the server + list: list the capabilities currently enabled + req: request a capability + ack: acknowledge capabilities which require client-side acknowledgement + end: end the capability negotiation -引数無しの場合、"ls" と "list" を送信します。 +Without argument, "ls" and "list" are sent. -WeeChat がサポートする機能: account-notify、away-notify、cap-notify、chghost、extended-join、invite-notify、multi-prefix、server-time、userhost-in-names。 +Capabilities supported by WeeChat are: account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, multi-prefix, server-time, setname, userhost-in-names. -自動的に有効化する機能を設定するにはオプション irc.server_default.capabilities (または対象のサーバに関するオプション irc.server.xxx.capabilities) を使ってください。 +The capabilities to automatically enable on servers can be set in option irc.server_default.capabilities (or by server in option irc.server.xxx.capabilities). -例: +Examples: /cap /cap req multi-prefix away-notify ---- @@ -808,6 +808,15 @@ mask: マスクにマッチするサービスだけをリストアップ type: タイプにマッチするサービスだけをリストアップ ---- +[[command_irc_setname]] +* `+setname+`: set real name + +---- +/setname <realname> + +realname: new real name +---- + [[command_irc_squery]] * `+squery+`: サービスにメッセージを配送 diff --git a/doc/pl/includes/autogen_user_commands.pl.adoc b/doc/pl/includes/autogen_user_commands.pl.adoc index 22bb63eb1..31beb3f5e 100644 --- a/doc/pl/includes/autogen_user_commands.pl.adoc +++ b/doc/pl/includes/autogen_user_commands.pl.adoc @@ -121,19 +121,19 @@ Bez podania argumentu komenda wyświetla listę banów na obecnym kanale. req|ack [<opcja> [<opcja>...]] end - ls: wyświetla opcje wspierane przez serwer - list: wyświetla obecnie włączone opcje - req: żądanie opcji - ack: potwierdzenie opcji wymagających potwierdzenia po stronie klienta - end: kończy negocjacje opcji + ls: list the capabilities supported by the server + list: list the capabilities currently enabled + req: request a capability + ack: acknowledge capabilities which require client-side acknowledgement + end: end the capability negotiation -Bez argumentu, wysyłane są "ls" i "list". +Without argument, "ls" and "list" are sent. -Opcje wspierane przez WeeChat to: account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, multi-prefix, server-time, userhost-in-names. +Capabilities supported by WeeChat are: account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, multi-prefix, server-time, setname, userhost-in-names. -Opcje automatycznie włączane na serwerach można ustawić za pomocą opcji irc.server_default.capabilities (albo dla konkretnego serwera, opcja irc.server.xxx.capabilities). +The capabilities to automatically enable on servers can be set in option irc.server_default.capabilities (or by server in option irc.server.xxx.capabilities). -Przykłady: +Examples: /cap /cap req multi-prefix away-notify ---- @@ -807,6 +807,15 @@ maska: wyświetl tylko serwisy pasujące do maski typ: wyświetl tylko serwisy tego typu ---- +[[command_irc_setname]] +* `+setname+`: set real name + +---- +/setname <realname> + +realname: new real name +---- + [[command_irc_squery]] * `+squery+`: dostarcza wiadomość do usługi diff --git a/doc/sr/includes/autogen_user_commands.sr.adoc b/doc/sr/includes/autogen_user_commands.sr.adoc index 0ad722248..eec3016d9 100644 --- a/doc/sr/includes/autogen_user_commands.sr.adoc +++ b/doc/sr/includes/autogen_user_commands.sr.adoc @@ -121,19 +121,19 @@ req|ack [<могућност> [<могућност>...]] end - ls: исписује могућности које подржава сервер - list: исписује могућности које су тренутно укључене - req: захтева могућност - ack: прихвата могућности које захтевају потврду са клијентске стране - end: завршава преговарање о могућностима + ls: list the capabilities supported by the server + list: list the capabilities currently enabled + req: request a capability + ack: acknowledge capabilities which require client-side acknowledgement + end: end the capability negotiation -Без аргумента се шаљу „ls” и „list”. +Without argument, "ls" and "list" are sent. -Програм WeeChat подржава следеће могућности: account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, multi-prefix, server-time, userhost-in-names. +Capabilities supported by WeeChat are: account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, multi-prefix, server-time, setname, userhost-in-names. -Могућности које се аутоматски укључују на серверима могу да се поставе у опцији irc.server_default.capabilities (или посебно за сваки сервер у опцији irc.server.xxx.capabilities). +The capabilities to automatically enable on servers can be set in option irc.server_default.capabilities (or by server in option irc.server.xxx.capabilities). -Примери: +Examples: /cap /cap req multi-prefix away-notify ---- @@ -808,6 +808,15 @@ noопција: постављање логичке опције на ’off’ тип: приказују се само сервиси овог типа ---- +[[command_irc_setname]] +* `+setname+`: set real name + +---- +/setname <realname> + +realname: new real name +---- + [[command_irc_squery]] * `+squery+`: достављање поруке сервису @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-06-15 18:48+0200\n" +"POT-Creation-Date: 2021-06-15 18:50+0200\n" "PO-Revision-Date: 2021-05-25 18:28+0200\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6747,7 +6747,7 @@ msgid "" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, cap-" "notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"setname, userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set in option irc." "server_default.capabilities (or by server in option irc.server.xxx." @@ -7594,6 +7594,17 @@ msgstr "" "služba: jméno služby\n" " text: text, který se má poslat" +#, fuzzy +msgid "set real name" +msgstr "jméno serveru" + +msgid "<realname>" +msgstr "" + +#, fuzzy +msgid "realname: new real name" +msgstr "čtení - jméno proměnné" + msgid "disconnect server links" msgstr "odpojit spojení serveru" @@ -9218,6 +9229,10 @@ msgstr "%s%s%s%s%s%s%s%s%s%s skončil %s(%s%s%s)" msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s skončil" +#, fuzzy, c-format +msgid "%sReal name set to: %s" +msgstr "%sSelhalo odnastavení volby \"%s\"" + #, c-format msgid "%s%s: \"%s\" command received without channel" msgstr "%s%s: obdržen \"%s\" příkaz bez kanálu" @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-06-15 18:48+0200\n" +"POT-Creation-Date: 2021-06-15 18:50+0200\n" "PO-Revision-Date: 2021-06-05 23:02+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <kde-i18n-de@kde.org>\n" @@ -8386,6 +8386,7 @@ msgstr "Aushandlung der Clientfähigkeit" msgid "ls || list || req|ack [<capability> [<capability>...]] || end" msgstr "ls || list || req|ack [<capability> [<capability>...]] || end" +#, fuzzy msgid "" " ls: list the capabilities supported by the server\n" " list: list the capabilities currently enabled\n" @@ -8397,7 +8398,7 @@ msgid "" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, cap-" "notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"setname, userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set in option irc." "server_default.capabilities (or by server in option irc.server.xxx." @@ -9418,6 +9419,17 @@ msgstr "" "service: Name des Service\n" " text: zu sendender Text" +#, fuzzy +msgid "set real name" +msgstr "Servername" + +msgid "<realname>" +msgstr "" + +#, fuzzy +msgid "realname: new real name" +msgstr "lese - Variablenname" + msgid "disconnect server links" msgstr "Verbindung zum Server trennen" @@ -11294,6 +11306,10 @@ msgstr "%s%s%s%s%s%s%s%s%s%s hat den IRC verlassen %s(%s%s%s)" msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s hat den IRC verlassen" +#, fuzzy, c-format +msgid "%sReal name set to: %s" +msgstr "%sEinstellung \"%s\" konnte nicht gesetzt werden" + #, c-format msgid "%s%s: \"%s\" command received without channel" msgstr "%s%s: Der Befehl \"%s\" wurde ohne Kanal empfangen" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-06-15 18:48+0200\n" +"POT-Creation-Date: 2021-06-15 18:50+0200\n" "PO-Revision-Date: 2021-05-25 18:28+0200\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6960,7 +6960,7 @@ msgid "" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, cap-" "notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"setname, userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set in option irc." "server_default.capabilities (or by server in option irc.server.xxx." @@ -7822,6 +7822,17 @@ msgstr "" "servicio: nombre del servicio\n" " texto: texto a enviar" +#, fuzzy +msgid "set real name" +msgstr "nombre del servidor" + +msgid "<realname>" +msgstr "" + +#, fuzzy +msgid "realname: new real name" +msgstr "lectura - nombre de variable" + msgid "disconnect server links" msgstr "desconectar los enlaces de servidor" @@ -9521,6 +9532,10 @@ msgstr "%s%s%s%s%s%s%s%s%s%s ha salido %s(%s%s%s)" msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s ha salido" +#, fuzzy, c-format +msgid "%sReal name set to: %s" +msgstr "%sNo se pudo deshacer la opción \"%s\"" + #, c-format msgid "%s%s: \"%s\" command received without channel" msgstr "%s%s: comando \"%s\" recibido sin un canal" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-06-15 18:48+0200\n" -"PO-Revision-Date: 2021-06-15 18:49+0200\n" +"POT-Creation-Date: 2021-06-15 18:50+0200\n" +"PO-Revision-Date: 2021-06-15 18:52+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -8234,7 +8234,7 @@ msgid "" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, cap-" "notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"setname, userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set in option irc." "server_default.capabilities (or by server in option irc.server.xxx." @@ -8247,19 +8247,14 @@ msgstr "" " ls : lister les capacités supportées par le serveur\n" " list : lister les capacités actuellement activées\n" " req : demander une capacité\n" -" ack : accuser réception de capacités qui nécessitent un accusé de " -"réception du client\n" +" ack : accuser réception de capacités qui nécessitent un accusé de réception du client\n" " end : terminer la négociation de capacité\n" "\n" "Sans paramètre, \"ls\" et \"list\" sont envoyés.\n" "\n" -"Les capacités supportées par WeeChat sont : account-notify, away-notify, cap-" -"notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"Les capacités supportées par WeeChat sont : account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, multi-prefix, server-time, setname, userhost-in-names.\n" "\n" -"Les capacités à activer automatiquement sur les serveurs peuvent être " -"définies dans l'option irc.server_default.capabilities (ou par serveur dans " -"l'option irc.server.xxx.capabilities).\n" +"Les capacités à activer automatiquement sur les serveurs peuvent être définies dans l'option irc.server_default.capabilities (ou par serveur dans l'option irc.server.xxx.capabilities).\n" "\n" "Exemples :\n" " /cap\n" @@ -9244,6 +9239,15 @@ msgstr "" "service : nom du service\n" " texte : texte à envoyer" +msgid "set real name" +msgstr "définir le nom réel" + +msgid "<realname>" +msgstr "<nom_réel>" + +msgid "realname: new real name" +msgstr "nom_réel : nouveau nom réel" + msgid "disconnect server links" msgstr "déconnecter les liens vers un serveur" @@ -11057,6 +11061,10 @@ msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s a quitté" #, c-format +msgid "%sReal name set to: %s" +msgstr "%sNom réel défini à : %s" + +#, c-format msgid "%s%s: \"%s\" command received without channel" msgstr "%s%s : commande \"%s\" reçue sans canal" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-06-15 18:48+0200\n" +"POT-Creation-Date: 2021-06-15 18:50+0200\n" "PO-Revision-Date: 2021-05-25 18:28+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6294,7 +6294,7 @@ msgid "" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, cap-" "notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"setname, userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set in option irc." "server_default.capabilities (or by server in option irc.server.xxx." @@ -7190,6 +7190,16 @@ msgstr "" "szolgáltatás: szolgáltatás neve\n" " szöveg: küldendő üzenet" +#, fuzzy +msgid "set real name" +msgstr "cél: szerver neve" + +msgid "<realname>" +msgstr "" + +msgid "realname: new real name" +msgstr "" + msgid "disconnect server links" msgstr "szerver linkek lecsatlakoztatása" @@ -8792,6 +8802,10 @@ msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s %s(%s%s%s)%s kilépett" #, fuzzy, c-format +msgid "%sReal name set to: %s" +msgstr "%s nem sikerült a modul opciókat elmenteni\n" + +#, fuzzy, c-format msgid "%s%s: \"%s\" command received without channel" msgstr "%s \"%s\" parancs érkezett szoba megadása nélkül\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-06-15 18:48+0200\n" +"POT-Creation-Date: 2021-06-15 18:50+0200\n" "PO-Revision-Date: 2021-05-25 18:28+0200\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7093,7 +7093,7 @@ msgid "" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, cap-" "notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"setname, userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set in option irc." "server_default.capabilities (or by server in option irc.server.xxx." @@ -7959,6 +7959,17 @@ msgstr "" "servizio: nome del servizio\n" " testo: testo da inviare" +#, fuzzy +msgid "set real name" +msgstr "nome server" + +msgid "<realname>" +msgstr "" + +#, fuzzy +msgid "realname: new real name" +msgstr "lettura - nome variabile" + msgid "disconnect server links" msgstr "disconnette collegamenti al server" @@ -9682,6 +9693,10 @@ msgstr "%s%s%s%s%s%s%s%s%s%s si è disconnesso %s(%s%s%s)" msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s si è disconnesso" +#, fuzzy, c-format +msgid "%sReal name set to: %s" +msgstr "%sImpossibile disabilitare l'opzione \"%s\"" + #, c-format msgid "%s%s: \"%s\" command received without channel" msgstr "%s%s: comando \"%s\" ricevuto senza alcun canale" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-06-15 18:48+0200\n" +"POT-Creation-Date: 2021-06-15 18:50+0200\n" "PO-Revision-Date: 2021-05-25 18:28+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" @@ -7805,6 +7805,7 @@ msgstr "クライアント機能情報の交換" msgid "ls || list || req|ack [<capability> [<capability>...]] || end" msgstr "ls || list || req|ack [<capability> [<capability>...]] || end" +#, fuzzy msgid "" " ls: list the capabilities supported by the server\n" " list: list the capabilities currently enabled\n" @@ -7816,7 +7817,7 @@ msgid "" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, cap-" "notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"setname, userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set in option irc." "server_default.capabilities (or by server in option irc.server.xxx." @@ -8794,6 +8795,17 @@ msgstr "" "service: サービス名\n" " text: 送信テキスト" +#, fuzzy +msgid "set real name" +msgstr "サーバ名" + +msgid "<realname>" +msgstr "" + +#, fuzzy +msgid "realname: new real name" +msgstr "読み込み - 変数名" + msgid "disconnect server links" msgstr "サーバリンクを切断" @@ -10541,6 +10553,10 @@ msgstr "%s%s%s%s%s%s%s%s%s%s が終了 %s(%s%s%s)" msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s が終了" +#, fuzzy, c-format +msgid "%sReal name set to: %s" +msgstr "%sオプション \"%s\" の無効化に失敗しました" + #, c-format msgid "%s%s: \"%s\" command received without channel" msgstr "%s%s: \"%s\" コマンドをチャンネル無しで受信" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-06-15 18:48+0200\n" +"POT-Creation-Date: 2021-06-15 18:50+0200\n" "PO-Revision-Date: 2021-06-13 14:40+0200\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: Polish <kde-i18n-doc@kde.org>\n" @@ -8024,6 +8024,7 @@ msgstr "negocjacja możliwości klienta" msgid "ls || list || req|ack [<capability> [<capability>...]] || end" msgstr "ls || list || req|ack [<opcja> [<opcja>...]] || end" +#, fuzzy msgid "" " ls: list the capabilities supported by the server\n" " list: list the capabilities currently enabled\n" @@ -8035,7 +8036,7 @@ msgid "" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, cap-" "notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"setname, userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set in option irc." "server_default.capabilities (or by server in option irc.server.xxx." @@ -9035,6 +9036,17 @@ msgstr "" "usługa: nazwa usługi\n" " tekst: tekst do wysłania" +#, fuzzy +msgid "set real name" +msgstr "nazwa serwera" + +msgid "<realname>" +msgstr "" + +#, fuzzy +msgid "realname: new real name" +msgstr "odczyt - nazwa zmiennej" + msgid "disconnect server links" msgstr "rozłącza od podłączonych serwerów" @@ -10807,6 +10819,10 @@ msgstr "%s%s%s%s%s%s%s%s%s%s wyszedł z IRC %s(%s%s%s)" msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s wyszedł z IRC" +#, fuzzy, c-format +msgid "%sReal name set to: %s" +msgstr "%sNie powiodło się ustawienie opcji \"%s\"" + #, c-format msgid "%s%s: \"%s\" command received without channel" msgstr "%s%s: \"%s\" komenda otrzymana bez kanału" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-06-15 18:48+0200\n" +"POT-Creation-Date: 2021-06-15 18:50+0200\n" "PO-Revision-Date: 2021-05-25 18:28+0200\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -7583,7 +7583,7 @@ msgid "" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, cap-" "notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"setname, userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set in option irc." "server_default.capabilities (or by server in option irc.server.xxx." @@ -8575,6 +8575,17 @@ msgstr "" "serviço: nome do serviço\n" " texto: texto a enviar" +#, fuzzy +msgid "set real name" +msgstr "nome do servidor" + +msgid "<realname>" +msgstr "" + +#, fuzzy +msgid "realname: new real name" +msgstr "leitura - nome de variável" + msgid "disconnect server links" msgstr "desconectar links do servidor" @@ -10362,6 +10373,10 @@ msgstr "%s%s%s%s%s%s%s%s%s%s saiu %s(%s%s%s)" msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s saiu" +#, fuzzy, c-format +msgid "%sReal name set to: %s" +msgstr "%sFalha ao reinicializar a opção \"%s\"" + #, c-format msgid "%s%s: \"%s\" command received without channel" msgstr "%s%s: o comando \"%s\" foi recebido sem canal" diff --git a/po/pt_BR.po b/po/pt_BR.po index b7cc7584e..2b24ea8aa 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: 2021-06-15 18:48+0200\n" +"POT-Creation-Date: 2021-06-15 18:50+0200\n" "PO-Revision-Date: 2021-05-25 18:28+0200\n" "Last-Translator: Érico Nogueira <ericonr@disroot.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6936,7 +6936,7 @@ msgid "" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, cap-" "notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"setname, userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set in option irc." "server_default.capabilities (or by server in option irc.server.xxx." @@ -7669,6 +7669,16 @@ msgid "" " text: text to send" msgstr "" +#, fuzzy +msgid "set real name" +msgstr "nome do servidor" + +msgid "<realname>" +msgstr "" + +msgid "realname: new real name" +msgstr "" + msgid "disconnect server links" msgstr "" @@ -9223,6 +9233,10 @@ msgstr "" msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "" +#, fuzzy, c-format +msgid "%sReal name set to: %s" +msgstr "%sFalhou ao desabilitar a opção \"%s\"" + #, c-format msgid "%s%s: \"%s\" command received without channel" msgstr "" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-06-15 18:48+0200\n" +"POT-Creation-Date: 2021-06-15 18:50+0200\n" "PO-Revision-Date: 2021-05-25 18:28+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6336,7 +6336,7 @@ msgid "" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, cap-" "notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"setname, userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set in option irc." "server_default.capabilities (or by server in option irc.server.xxx." @@ -7224,6 +7224,16 @@ msgstr "" "сервис: название сервиса\n" " текст: отправляемый текст" +#, fuzzy +msgid "set real name" +msgstr "цель: название сервера" + +msgid "<realname>" +msgstr "" + +msgid "realname: new real name" +msgstr "" + msgid "disconnect server links" msgstr "отключить ссылки сервера" @@ -8829,6 +8839,10 @@ msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s %s(%s%s%s)%s вышел" #, fuzzy, c-format +msgid "%sReal name set to: %s" +msgstr "%s не могу сохранить конфигурационный файл pluginов\n" + +#, fuzzy, c-format msgid "%s%s: \"%s\" command received without channel" msgstr "%s \"%s\" команда получена без канала\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-06-15 18:48+0200\n" +"POT-Creation-Date: 2021-06-15 18:50+0200\n" "PO-Revision-Date: 2021-06-03 15:15+0400\n" "Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8009,6 +8009,7 @@ msgstr "преговарање могућности клијента" msgid "ls || list || req|ack [<capability> [<capability>...]] || end" msgstr "ls || list || req|ack [<могућност> [<могућност>...]] || end" +#, fuzzy msgid "" " ls: list the capabilities supported by the server\n" " list: list the capabilities currently enabled\n" @@ -8020,7 +8021,7 @@ msgid "" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, cap-" "notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"setname, userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set in option irc." "server_default.capabilities (or by server in option irc.server.xxx." @@ -9017,6 +9018,17 @@ msgstr "" "сервис: име сервиса\n" " текст: текст који се шаље" +#, fuzzy +msgid "set real name" +msgstr "име сервера" + +msgid "<realname>" +msgstr "" + +#, fuzzy +msgid "realname: new real name" +msgstr "читање - име променљиве" + msgid "disconnect server links" msgstr "прекид серверских веза" @@ -10780,6 +10792,10 @@ msgstr "%s%s%s%s%s%s%s%s%s%s је прекинуо %s(%s%s%s)" msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s је прекинуо" +#, fuzzy, c-format +msgid "%sReal name set to: %s" +msgstr "%sНије успело постављање опције „%s”" + #, c-format msgid "%s%s: \"%s\" command received without channel" msgstr "%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: 2021-06-15 18:48+0200\n" +"POT-Creation-Date: 2021-06-15 18:50+0200\n" "PO-Revision-Date: 2021-05-25 18:28+0200\n" "Last-Translator: Emir SARI <bitigchi@me.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6269,7 +6269,7 @@ msgid "" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, cap-" "notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"setname, userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set in option irc." "server_default.capabilities (or by server in option irc.server.xxx." @@ -6970,6 +6970,16 @@ msgid "" " text: text to send" msgstr "" +#, fuzzy +msgid "set real name" +msgstr "sunucu adı" + +msgid "<realname>" +msgstr "" + +msgid "realname: new real name" +msgstr "" + msgid "disconnect server links" msgstr "" @@ -8378,6 +8388,10 @@ msgstr "%s%s%s%s%s%s%s%s%s%s çıktı %s(%s%s%s)" msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s çıktı" +#, fuzzy, c-format +msgid "%sReal name set to: %s" +msgstr "%s\"%s\" seçeneği ayarlanamadı" + #, c-format msgid "%s%s: \"%s\" command received without channel" msgstr "" diff --git a/po/weechat.pot b/po/weechat.pot index 3b94cf2ba..9f3382781 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: 2021-06-15 18:48+0200\n" +"POT-Creation-Date: 2021-06-15 18:50+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" @@ -5773,7 +5773,7 @@ msgid "" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, cap-" "notify, chghost, extended-join, invite-notify, multi-prefix, server-time, " -"userhost-in-names.\n" +"setname, userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set in option irc." "server_default.capabilities (or by server in option irc.server.xxx." @@ -6458,6 +6458,15 @@ msgid "" " text: text to send" msgstr "" +msgid "set real name" +msgstr "" + +msgid "<realname>" +msgstr "" + +msgid "realname: new real name" +msgstr "" + msgid "disconnect server links" msgstr "" @@ -7851,6 +7860,10 @@ msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "" #, c-format +msgid "%sReal name set to: %s" +msgstr "" + +#, c-format msgid "%s%s: \"%s\" command received without channel" msgstr "" diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index f14f70ef2..9c8d88087 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -5670,6 +5670,27 @@ IRC_COMMAND_CALLBACK(squery) } /* + * Callback for command "/setname": set real name. + */ + +IRC_COMMAND_CALLBACK(setname) +{ + IRC_BUFFER_GET_SERVER(buffer); + IRC_COMMAND_CHECK_SERVER("setname", 1, 1); + + /* make C compiler happy */ + (void) pointer; + (void) data; + + WEECHAT_COMMAND_MIN_ARGS(2, ""); + + irc_server_sendf (ptr_server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL, + "SETNAME :%s", argv_eol[1]); + + return WEECHAT_RC_OK; +} + +/* * Callback for command "/squit": disconnects server links. */ @@ -6480,7 +6501,8 @@ irc_command_init () "\n" "Capabilities supported by WeeChat are: " "account-notify, away-notify, cap-notify, chghost, extended-join, " - "invite-notify, multi-prefix, server-time, userhost-in-names.\n" + "invite-notify, multi-prefix, server-time, setname, " + "userhost-in-names.\n" "\n" "The capabilities to automatically enable on servers can be set " "in option irc.server_default.capabilities (or by server in " @@ -7108,6 +7130,12 @@ irc_command_init () " text: text to send"), NULL, &irc_command_squery, NULL, NULL); weechat_hook_command ( + "setname", + N_("set real name"), + N_("<realname>"), + N_("realname: new real name"), + NULL, &irc_command_setname, NULL, NULL); + weechat_hook_command ( "squit", N_("disconnect server links"), N_("<target> <comment>"), diff --git a/src/plugins/irc/irc-command.h b/src/plugins/irc/irc-command.h index 69d1b3f30..e9a82cdb7 100644 --- a/src/plugins/irc/irc-command.h +++ b/src/plugins/irc/irc-command.h @@ -56,7 +56,7 @@ struct t_irc_channel; /* list of supported capabilities (for completion in command /cap) */ #define IRC_COMMAND_CAP_SUPPORTED_COMPLETION \ "account-notify|away-notify|cap-notify|chghost|extended-join|" \ - "invite-notify|multi-prefix|server-time|userhost-in-names|%*" + "invite-notify|multi-prefix|server-time|setname|userhost-in-names|%*" /* list of supported CTCPs (for completion in command /ctcp) */ #define IRC_COMMAND_CTCP_SUPPORTED_COMPLETION \ diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index acea9fd90..642f7a8e2 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -2847,6 +2847,58 @@ IRC_PROTOCOL_CALLBACK(quit) } /* + * Callback for the IRC message "SETNAME": set real name + * (with capability "setname"). + * + * Message looks like: + * :nick!user@host SETNAME :the realname + */ + +IRC_PROTOCOL_CALLBACK(setname) +{ + struct t_irc_channel *ptr_channel; + struct t_irc_nick *ptr_nick; + char *pos_realname, *realname_color; + + IRC_PROTOCOL_MIN_ARGS(3); + + pos_realname = (argv_eol[2][0] == ':') ? argv_eol[2] + 1 : argv_eol[2]; + + if (weechat_hashtable_has_key (server->cap_list, "setname")) + { + for (ptr_channel = server->channels; ptr_channel; + ptr_channel = ptr_channel->next_channel) + { + ptr_nick = irc_nick_search (server, ptr_channel, nick); + if (ptr_nick) + { + if (ptr_nick->realname) + free (ptr_nick->realname); + ptr_nick->realname = strdup (pos_realname); + } + } + } + + if (!ignored) + { + realname_color = irc_color_decode ( + pos_realname, + weechat_config_boolean (irc_config_network_colors_receive)); + weechat_printf_date_tags ( + irc_msgbuffer_get_target_buffer (server, NULL, command, NULL, NULL), + date, + irc_protocol_tags (command, NULL, NULL, NULL), + _("%sReal name set to: %s"), + weechat_prefix ("network"), + (realname_color) ? realname_color : ""); + if (realname_color) + free (realname_color); + } + + return WEECHAT_RC_OK; +} + +/* * Callback for an IRC message with mode and reason (numeric). */ @@ -6611,6 +6663,7 @@ irc_protocol_recv_command (struct t_irc_server *server, IRCB(pong, 1, 0, pong), /* answer to a ping message */ IRCB(privmsg, 1, 1, privmsg), /* message received */ IRCB(quit, 1, 1, quit), /* close all connections and quit */ + IRCB(setname, 0, 1, setname), /* set realname */ IRCB(topic, 0, 1, topic), /* get/set channel topic */ IRCB(wallops, 1, 1, wallops), /* wallops */ IRCB(warn, 1, 0, warn), /* warning received from server */ diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp index 596a040aa..6b9f2a7e2 100644 --- a/tests/unit/plugins/irc/test-irc-protocol.cpp +++ b/tests/unit/plugins/irc/test-irc-protocol.cpp @@ -1259,6 +1259,56 @@ TEST(IrcProtocolWithServer, quit) /* * Tests functions: + * irc_protocol_cb_setname (without setname capability) + */ + +TEST(IrcProtocolWithServer, setname_without_setname_cap) +{ + struct t_irc_nick *ptr_nick; + + server_recv (":server 001 alice"); + server_recv (":alice!user@host JOIN #test"); + + ptr_nick = ptr_server->channels->nicks; + + POINTERS_EQUAL(NULL, ptr_nick->realname); + + /* not enough arguments */ + server_recv (":alice!user@host SETNAME"); + POINTERS_EQUAL(NULL, ptr_nick->realname); + + server_recv (":alice!user@host SETNAME :new realname"); + POINTERS_EQUAL(NULL, ptr_nick->realname); +} + +/* + * Tests functions: + * irc_protocol_cb_setname (with setname capability) + */ + +TEST(IrcProtocolWithServer, setname_with_setname_cap) +{ + struct t_irc_nick *ptr_nick; + + /* assume "setname" capability is enabled in server */ + hashtable_set (ptr_server->cap_list, "setname", NULL); + + server_recv (":server 001 alice"); + server_recv (":alice!user@host JOIN #test"); + + ptr_nick = ptr_server->channels->nicks; + + POINTERS_EQUAL(NULL, ptr_nick->realname); + + server_recv (":alice!user@host SETNAME :new realname"); + STRCMP_EQUAL("new realname", ptr_nick->realname); + + server_recv (":alice!user@host SETNAME :new realname2"); + STRCMP_EQUAL("new realname2", ptr_nick->realname); +} + +/* + * Tests functions: * irc_protocol_cb_topic */ |