diff options
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | doc/de/weechat_user.de.adoc | 15 | ||||
-rw-r--r-- | doc/en/weechat_user.en.adoc | 14 | ||||
-rw-r--r-- | doc/fr/weechat_user.fr.adoc | 14 | ||||
-rw-r--r-- | doc/it/weechat_user.it.adoc | 15 | ||||
-rw-r--r-- | doc/ja/weechat_user.ja.adoc | 15 | ||||
-rw-r--r-- | doc/pl/weechat_user.pl.adoc | 15 | ||||
-rw-r--r-- | doc/sr/weechat_user.sr.adoc | 15 | ||||
-rw-r--r-- | po/cs.po | 15 | ||||
-rw-r--r-- | po/de.po | 45 | ||||
-rw-r--r-- | po/es.po | 15 | ||||
-rw-r--r-- | po/fr.po | 22 | ||||
-rw-r--r-- | po/hu.po | 15 | ||||
-rw-r--r-- | po/it.po | 15 | ||||
-rw-r--r-- | po/ja.po | 15 | ||||
-rw-r--r-- | po/pl.po | 15 | ||||
-rw-r--r-- | po/pt.po | 15 | ||||
-rw-r--r-- | po/pt_BR.po | 15 | ||||
-rw-r--r-- | po/ru.po | 15 | ||||
-rw-r--r-- | po/sr.po | 15 | ||||
-rw-r--r-- | po/tr.po | 15 | ||||
-rw-r--r-- | po/weechat.pot | 15 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 5 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.h | 4 | ||||
-rw-r--r-- | src/plugins/irc/irc-input.c | 11 | ||||
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 4 | ||||
-rw-r--r-- | tests/unit/plugins/irc/test-irc-protocol.cpp | 4 |
27 files changed, 270 insertions, 109 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 06b937eec..a41737985 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -42,6 +42,7 @@ New features:: * alias: add `$&` to replace all arguments with double quotes escaped (issue #1140, issue #1190) * irc: rename "ssl" options to "tls", connect with TLS and port 6697 by default * irc: add support of capabilities "batch" and "draft/multiline" (issue #1292, issue #1923) + * irc: add support of capability "echo-message" (issue #139) * irc: add modifier "irc_cap_sync_req" (issue #1767) * irc: add support of "LINELEN" in message 005 (max message length in bytes) (issue #1927) * irc: add support of "UTF8ONLY" in message 005 (issue #1688) diff --git a/doc/de/weechat_user.de.adoc b/doc/de/weechat_user.de.adoc index f13e45774..65d1e2f9d 100644 --- a/doc/de/weechat_user.de.adoc +++ b/doc/de/weechat_user.de.adoc @@ -3465,6 +3465,7 @@ WeeChat unterstützt folgende https://ircv3.net/irc/[IRCv3 extensions ^↗^,win * <<irc_ircv3_cap_notify,cap-notify>> * <<irc_ircv3_chghost,chghost>> * <<irc_ircv3_draft/multiline,draft/multiline>> +* <<irc_ircv3_echo_message,echo-message>> * <<irc_ircv3_extended_join,extended-join>> * <<irc_ircv3_invite_notify,invite-notify>> * <<irc_ircv3_message_tags,message-tags>> @@ -3646,6 +3647,20 @@ Display of the message sent in WeeChat: | on two lines .... +// TRANSLATION MISSING +[[irc_ircv3_echo_message]] +===== echo-message + +Specification: https://ircv3.net/specs/extensions/echo-message[echo-message ^↗^,window=_blank] + +This capability forces the server to send PRIVMSG, NOTICE and TAGMSG messages +back to WeeChat. + +WeeChat displays only the message received and not the message sent, so a delay +can be noticed between the send and the display. When the message is displayed, +it means it has been properly received by the server and propagated to other +clients connected to the server as well. + [[irc_ircv3_extended_join]] ===== extended-join diff --git a/doc/en/weechat_user.en.adoc b/doc/en/weechat_user.en.adoc index 3dcba7e08..58a4bd131 100644 --- a/doc/en/weechat_user.en.adoc +++ b/doc/en/weechat_user.en.adoc @@ -3402,6 +3402,7 @@ WeeChat supports the following https://ircv3.net/irc/[IRCv3 extensions ^↗^,wi * <<irc_ircv3_cap_notify,cap-notify>> * <<irc_ircv3_chghost,chghost>> * <<irc_ircv3_draft/multiline,draft/multiline>> +* <<irc_ircv3_echo_message,echo-message>> * <<irc_ircv3_extended_join,extended-join>> * <<irc_ircv3_invite_notify,invite-notify>> * <<irc_ircv3_message_tags,message-tags>> @@ -3582,6 +3583,19 @@ Display of the message sent in WeeChat: | on two lines .... +[[irc_ircv3_echo_message]] +===== echo-message + +Specification: https://ircv3.net/specs/extensions/echo-message[echo-message ^↗^,window=_blank] + +This capability forces the server to send PRIVMSG, NOTICE and TAGMSG messages +back to WeeChat. + +WeeChat displays only the message received and not the message sent, so a delay +can be noticed between the send and the display. When the message is displayed, +it means it has been properly received by the server and propagated to other +clients connected to the server as well. + [[irc_ircv3_extended_join]] ===== extended-join diff --git a/doc/fr/weechat_user.fr.adoc b/doc/fr/weechat_user.fr.adoc index 8b144789c..4cfe059f9 100644 --- a/doc/fr/weechat_user.fr.adoc +++ b/doc/fr/weechat_user.fr.adoc @@ -3506,6 +3506,7 @@ WeeChat supporte les https://ircv3.net/irc/[extensions IRCv3 ^↗^,window=_blan * <<irc_ircv3_cap_notify,cap-notify>> * <<irc_ircv3_chghost,chghost>> * <<irc_ircv3_draft/multiline,draft/multiline>> +* <<irc_ircv3_echo_message,echo-message>> * <<irc_ircv3_extended_join,extended-join>> * <<irc_ircv3_invite_notify,invite-notify>> * <<irc_ircv3_message_tags,message-tags>> @@ -3694,6 +3695,19 @@ Affichage du message envoyé dans WeeChat : | sur deux lignes .... +[[irc_ircv3_echo_message]] +===== echo-message + +Spécification : https://ircv3.net/specs/extensions/echo-message[echo-message ^↗^,window=_blank] + +Cette capacité oblige le serveur à renvoyer les messages PRIVMSG, NOTICE et TAGMSG +à WeeChat. + +WeeChat affiche seulement le message reçu et non pas le message envoyé, donc +un délai peut être perçu entre l'envoi et l'affichage. Lorsque le message est +affiché, cela signifie qu'il a bien été reçu par le serveur et également propagé +aux autres clients connectés sur le serveur. + [[irc_ircv3_extended_join]] ===== extended-join diff --git a/doc/it/weechat_user.it.adoc b/doc/it/weechat_user.it.adoc index ae271e56b..e4a6244b7 100644 --- a/doc/it/weechat_user.it.adoc +++ b/doc/it/weechat_user.it.adoc @@ -3691,6 +3691,7 @@ WeeChat supports the following https://ircv3.net/irc/[IRCv3 extensions ^↗^,wi * <<irc_ircv3_cap_notify,cap-notify>> * <<irc_ircv3_chghost,chghost>> * <<irc_ircv3_draft/multiline,draft/multiline>> +* <<irc_ircv3_echo_message,echo-message>> * <<irc_ircv3_extended_join,extended-join>> * <<irc_ircv3_invite_notify,invite-notify>> * <<irc_ircv3_message_tags,message-tags>> @@ -3872,6 +3873,20 @@ Display of the message sent in WeeChat: | on two lines .... +// TRANSLATION MISSING +[[irc_ircv3_echo_message]] +===== echo-message + +Specification: https://ircv3.net/specs/extensions/echo-message[echo-message ^↗^,window=_blank] + +This capability forces the server to send PRIVMSG, NOTICE and TAGMSG messages +back to WeeChat. + +WeeChat displays only the message received and not the message sent, so a delay +can be noticed between the send and the display. When the message is displayed, +it means it has been properly received by the server and propagated to other +clients connected to the server as well. + [[irc_ircv3_extended_join]] ===== extended-join diff --git a/doc/ja/weechat_user.ja.adoc b/doc/ja/weechat_user.ja.adoc index 8353c7b34..5d813642c 100644 --- a/doc/ja/weechat_user.ja.adoc +++ b/doc/ja/weechat_user.ja.adoc @@ -3557,6 +3557,7 @@ WeeChat supports the following https://ircv3.net/irc/[IRCv3 extensions ^↗^,wi * <<irc_ircv3_batch,batch>> * <<irc_ircv3_chghost,chghost>> * <<irc_ircv3_draft/multiline,draft/multiline>> +* <<irc_ircv3_echo_message,echo-message>> * <<irc_ircv3_extended_join,extended-join>> * <<irc_ircv3_invite_notify,invite-notify>> * <<irc_ircv3_message_tags,message-tags>> @@ -3739,6 +3740,20 @@ Display of the message sent in WeeChat: | on two lines .... +// TRANSLATION MISSING +[[irc_ircv3_echo_message]] +===== echo-message + +Specification: https://ircv3.net/specs/extensions/echo-message[echo-message ^↗^,window=_blank] + +This capability forces the server to send PRIVMSG, NOTICE and TAGMSG messages +back to WeeChat. + +WeeChat displays only the message received and not the message sent, so a delay +can be noticed between the send and the display. When the message is displayed, +it means it has been properly received by the server and propagated to other +clients connected to the server as well. + [[irc_ircv3_extended_join]] ===== extended-join diff --git a/doc/pl/weechat_user.pl.adoc b/doc/pl/weechat_user.pl.adoc index 35d787a99..acd6d5e10 100644 --- a/doc/pl/weechat_user.pl.adoc +++ b/doc/pl/weechat_user.pl.adoc @@ -3445,6 +3445,7 @@ WeeChat wspiera następujące https://ircv3.net/irc/[rozszerzenia IRCv3 ^↗^,w * <<irc_ircv3_cap_notify,cap-notify>> * <<irc_ircv3_chghost,chghost>> * <<irc_ircv3_draft/multiline,draft/multiline>> +* <<irc_ircv3_echo_message,echo-message>> * <<irc_ircv3_extended_join,extended-join>> * <<irc_ircv3_invite_notify,invite-notify>> * <<irc_ircv3_message_tags,message-tags>> @@ -3627,6 +3628,20 @@ Display of the message sent in WeeChat: | on two lines .... +// TRANSLATION MISSING +[[irc_ircv3_echo_message]] +===== echo-message + +Specification: https://ircv3.net/specs/extensions/echo-message[echo-message ^↗^,window=_blank] + +This capability forces the server to send PRIVMSG, NOTICE and TAGMSG messages +back to WeeChat. + +WeeChat displays only the message received and not the message sent, so a delay +can be noticed between the send and the display. When the message is displayed, +it means it has been properly received by the server and propagated to other +clients connected to the server as well. + [[irc_ircv3_extended_join]] ===== extended-join diff --git a/doc/sr/weechat_user.sr.adoc b/doc/sr/weechat_user.sr.adoc index 1549db885..25ae8c2ce 100644 --- a/doc/sr/weechat_user.sr.adoc +++ b/doc/sr/weechat_user.sr.adoc @@ -3196,6 +3196,7 @@ WeeChat подржава следећа https://ircv3.net/irc/[IRCv3 проши * <<irc_ircv3_cap_notify,cap-notify>> * <<irc_ircv3_chghost,chghost>> * <<irc_ircv3_draft/multiline,draft/multiline>> +* <<irc_ircv3_echo_message,echo-message>> * <<irc_ircv3_extended_join,extended-join>> * <<irc_ircv3_invite_notify,invite-notify>> * <<irc_ircv3_message_tags,message-tags>> @@ -3376,6 +3377,20 @@ Display of the message sent in WeeChat: | on two lines .... +// TRANSLATION MISSING +[[irc_ircv3_echo_message]] +===== echo-message + +Specification: https://ircv3.net/specs/extensions/echo-message[echo-message ^↗^,window=_blank] + +This capability forces the server to send PRIVMSG, NOTICE and TAGMSG messages +back to WeeChat. + +WeeChat displays only the message received and not the message sent, so a delay +can be noticed between the send and the display. When the message is displayed, +it means it has been properly received by the server and propagated to other +clients connected to the server as well. + [[irc_ircv3_extended_join]] ===== extended-join @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-05-20 16:55+0200\n" +"POT-Creation-Date: 2023-05-23 15:52+0200\n" "PO-Revision-Date: 2023-05-01 20:23+0200\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6877,10 +6877,6 @@ msgid "" "%s%s: you must specify channel for \"%s\" command if you're not in a channel" msgstr "%s%s: pokud nejste v kanálu, je ho třeba uvést pro příkaz \"%s\"" -#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) -msgid "Notice" -msgstr "Oznámení" - #, c-format msgid "" "%s%s: server must be specified because you are not on an irc server or " @@ -7047,6 +7043,10 @@ msgstr "" msgid "%s%s: you are not on channel \"%s\"" msgstr "%s%s: nejste na kanálu \"%s\"" +#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) +msgid "Notice" +msgstr "Oznámení" + msgid "find information about the administrator of the server" msgstr "najít informace o administrátorovi serveru" @@ -7305,8 +7305,9 @@ msgid "" "Without argument, \"ls\" and \"list\" are sent.\n" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, batch, " -"cap-notify, chghost, draft/multiline, extended-join, invite-notify, message-" -"tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"cap-notify, chghost, draft/multiline, echo-message, extended-join, invite-" +"notify, message-tags, 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 option irc.server.xxx." @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-05-20 16:55+0200\n" +"POT-Creation-Date: 2023-05-23 15:52+0200\n" "PO-Revision-Date: 2023-05-14 15:49+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <kde-i18n-de@kde.org>\n" @@ -8695,10 +8695,6 @@ msgstr "" "%s%s: Für den Befehl, \"%s\", muss ein Kanal angegeben werden, falls man " "sich nicht in einem Kanal befindet" -#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) -msgid "Notice" -msgstr "Hinweis" - #, c-format msgid "" "%s%s: server must be specified because you are not on an irc server or " @@ -8864,6 +8860,10 @@ msgstr "" msgid "%s%s: you are not on channel \"%s\"" msgstr "%s%s: Sie befinden sich nicht in einem Kanal \"%s\"" +#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) +msgid "Notice" +msgstr "Hinweis" + msgid "find information about the administrator of the server" msgstr "Information über den Server-Administrator abfragen" @@ -9203,6 +9203,36 @@ 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" +#| " req: request a new capability or remove a capability (if starting with " +#| "\"-\", for example: \"-multi-prefix\")\n" +#| " ack: acknowledge capabilities which require client-side " +#| "acknowledgement\n" +#| " end: end the capability negotiation\n" +#| "\n" +#| "Without argument, \"ls\" and \"list\" are sent.\n" +#| "\n" +#| "Capabilities supported by WeeChat are: account-notify, away-notify, " +#| "batch, cap-notify, chghost, draft/multiline, extended-join, invite-" +#| "notify, message-tags, 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 option irc.server.xxx." +#| "capabilities).\n" +#| "\n" +#| "Examples:\n" +#| " display supported and enabled capabilities:\n" +#| " /cap\n" +#| " request capabilities multi-prefix and away-notify:\n" +#| " /cap req multi-prefix away-notify\n" +#| " request capability extended-join, remove capability multi-prefix:\n" +#| " /cap req extended-join -multi-prefix\n" +#| " remove capability away-notify:\n" +#| " /cap req -away-notify" msgid "" " ls: list the capabilities supported by the server\n" " list: list the capabilities currently enabled\n" @@ -9214,8 +9244,9 @@ msgid "" "Without argument, \"ls\" and \"list\" are sent.\n" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, batch, " -"cap-notify, chghost, draft/multiline, extended-join, invite-notify, message-" -"tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"cap-notify, chghost, draft/multiline, echo-message, extended-join, invite-" +"notify, message-tags, 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 option irc.server.xxx." @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-05-20 16:55+0200\n" +"POT-Creation-Date: 2023-05-23 15:52+0200\n" "PO-Revision-Date: 2023-05-01 20:23+0200\n" "Last-Translator: Santiago Forero <santiago@forero.xyz>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7517,10 +7517,6 @@ msgid "" msgstr "" "%s%s: debes especificar el canal para el comando \"%s\" si no estás en uno" -#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) -msgid "Notice" -msgstr "Aviso" - #, c-format msgid "" "%s%s: server must be specified because you are not on an irc server or " @@ -7682,6 +7678,10 @@ msgstr "" msgid "%s%s: you are not on channel \"%s\"" msgstr "%s%s: no estas presente en el canal \"%s\"" +#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) +msgid "Notice" +msgstr "Aviso" + msgid "find information about the administrator of the server" msgstr "busca información sobre el administrador del servidor" @@ -7945,8 +7945,9 @@ msgid "" "Without argument, \"ls\" and \"list\" are sent.\n" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, batch, " -"cap-notify, chghost, draft/multiline, extended-join, invite-notify, message-" -"tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"cap-notify, chghost, draft/multiline, echo-message, extended-join, invite-" +"notify, message-tags, 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 option irc.server.xxx." @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-05-20 16:55+0200\n" -"PO-Revision-Date: 2023-05-20 16:59+0200\n" +"POT-Creation-Date: 2023-05-23 15:52+0200\n" +"PO-Revision-Date: 2023-05-23 21:22+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -8494,10 +8494,6 @@ msgstr "" "%s%s : vous devez spécifier le canal pour la commande \"%s\" si vous n'êtes " "pas sur un canal" -#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) -msgid "Notice" -msgstr "Notice" - #, c-format msgid "" "%s%s: server must be specified because you are not on an irc server or " @@ -8660,6 +8656,10 @@ msgstr "" msgid "%s%s: you are not on channel \"%s\"" msgstr "%s%s : vous n'êtes pas sur le canal \"%s\"" +#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) +msgid "Notice" +msgstr "Notice" + msgid "find information about the administrator of the server" msgstr "trouver les informations sur l'administrateur du serveur" @@ -9009,8 +9009,9 @@ msgid "" "Without argument, \"ls\" and \"list\" are sent.\n" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, batch, " -"cap-notify, chghost, draft/multiline, extended-join, invite-notify, message-" -"tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"cap-notify, chghost, draft/multiline, echo-message, extended-join, invite-" +"notify, message-tags, 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 option irc.server.xxx." @@ -9037,8 +9038,9 @@ msgstr "" "Sans paramètre, \"ls\" et \"list\" sont envoyés.\n" "\n" "Les capacités supportées par WeeChat sont : account-notify, away-notify, " -"batch, cap-notify, chghost, draft/multiline, extended-join, invite-notify, " -"message-tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"batch, cap-notify, chghost, draft/multiline, echo-message, extended-join, " +"invite-notify, message-tags, 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 " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-05-20 16:55+0200\n" +"POT-Creation-Date: 2023-05-23 15:52+0200\n" "PO-Revision-Date: 2023-05-01 20:23+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6368,10 +6368,6 @@ msgid "" "%s%s: you must specify channel for \"%s\" command if you're not in a channel" msgstr "" -#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) -msgid "Notice" -msgstr "" - #, fuzzy, c-format msgid "" "%s%s: server must be specified because you are not on an irc server or " @@ -6536,6 +6532,10 @@ msgstr "" msgid "%s%s: you are not on channel \"%s\"" msgstr "%s nem sikerült új szobát nyitni \"%s\"\n" +#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) +msgid "Notice" +msgstr "" + msgid "find information about the administrator of the server" msgstr "információ lekérdezése a szerver adminisztrátorról" @@ -6756,8 +6756,9 @@ msgid "" "Without argument, \"ls\" and \"list\" are sent.\n" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, batch, " -"cap-notify, chghost, draft/multiline, extended-join, invite-notify, message-" -"tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"cap-notify, chghost, draft/multiline, echo-message, extended-join, invite-" +"notify, message-tags, 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 option irc.server.xxx." @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-05-20 16:55+0200\n" +"POT-Creation-Date: 2023-05-23 15:52+0200\n" "PO-Revision-Date: 2023-05-01 20:23+0200\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7217,10 +7217,6 @@ msgstr "" "%s%s: è necessario specificare il canale per il comando \"%s\" se non si è " "in un canale" -#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) -msgid "Notice" -msgstr "Notice" - #, c-format msgid "" "%s%s: server must be specified because you are not on an irc server or " @@ -7383,6 +7379,10 @@ msgstr "" msgid "%s%s: you are not on channel \"%s\"" msgstr "%s%s: non sei sul canale \"%s\"" +#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) +msgid "Notice" +msgstr "Notice" + msgid "find information about the administrator of the server" msgstr "trova informazioni sull'amministratore del server" @@ -7644,8 +7644,9 @@ msgid "" "Without argument, \"ls\" and \"list\" are sent.\n" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, batch, " -"cap-notify, chghost, draft/multiline, extended-join, invite-notify, message-" -"tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"cap-notify, chghost, draft/multiline, echo-message, extended-join, invite-" +"notify, message-tags, 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 option irc.server.xxx." @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-05-20 16:55+0200\n" +"POT-Creation-Date: 2023-05-23 15:52+0200\n" "PO-Revision-Date: 2023-05-01 20:23+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" @@ -8218,10 +8218,6 @@ msgstr "" "%s%s: チャンネルに居ない状態で \"%s\" コマンドを実行するにはチャンネル名の指" "定が必要です" -#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) -msgid "Notice" -msgstr "Notice" - #, c-format msgid "" "%s%s: server must be specified because you are not on an irc server or " @@ -8377,6 +8373,10 @@ msgstr "" msgid "%s%s: you are not on channel \"%s\"" msgstr "%s%s: あなたはチャンネル \"%s\" にいません" +#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) +msgid "Notice" +msgstr "Notice" + msgid "find information about the administrator of the server" msgstr "サーバ管理者に関する情報を探す" @@ -8661,8 +8661,9 @@ msgid "" "Without argument, \"ls\" and \"list\" are sent.\n" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, batch, " -"cap-notify, chghost, draft/multiline, extended-join, invite-notify, message-" -"tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"cap-notify, chghost, draft/multiline, echo-message, extended-join, invite-" +"notify, message-tags, 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 option irc.server.xxx." @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-05-20 16:55+0200\n" +"POT-Creation-Date: 2023-05-23 15:52+0200\n" "PO-Revision-Date: 2023-05-01 20:23+0200\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: Polish <kde-i18n-doc@kde.org>\n" @@ -8952,10 +8952,6 @@ msgstr "" "%s%s: musisz podać kanał dla komendy \"%s\" jeśli nie znajdujesz się na " "kanale" -#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) -msgid "Notice" -msgstr "Powiadomienie" - #, c-format msgid "" "%s%s: server must be specified because you are not on an irc server or " @@ -9121,6 +9117,10 @@ msgstr "" msgid "%s%s: you are not on channel \"%s\"" msgstr "%s%s: nie jesteś na kanale \"%s\"" +#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) +msgid "Notice" +msgstr "Powiadomienie" + msgid "find information about the administrator of the server" msgstr "wyszukuje informacje o administratorze serwera" @@ -9510,8 +9510,9 @@ msgid "" "Without argument, \"ls\" and \"list\" are sent.\n" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, batch, " -"cap-notify, chghost, draft/multiline, extended-join, invite-notify, message-" -"tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"cap-notify, chghost, draft/multiline, echo-message, extended-join, invite-" +"notify, message-tags, 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 option irc.server.xxx." @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-05-20 16:55+0200\n" +"POT-Creation-Date: 2023-05-23 15:52+0200\n" "PO-Revision-Date: 2023-05-01 20:23+0200\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -7978,10 +7978,6 @@ msgstr "" "%s%s: deve especificar um canal no comando \"%s\" se não se encontra num " "canal" -#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) -msgid "Notice" -msgstr "Notice" - #, c-format msgid "" "%s%s: server must be specified because you are not on an irc server or " @@ -8144,6 +8140,10 @@ msgstr "" msgid "%s%s: you are not on channel \"%s\"" msgstr "%s%s: não está no canal \"%s\"" +#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) +msgid "Notice" +msgstr "Notice" + msgid "find information about the administrator of the server" msgstr "obter informação sobre o administrador do servidor" @@ -8409,8 +8409,9 @@ msgid "" "Without argument, \"ls\" and \"list\" are sent.\n" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, batch, " -"cap-notify, chghost, draft/multiline, extended-join, invite-notify, message-" -"tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"cap-notify, chghost, draft/multiline, echo-message, extended-join, invite-" +"notify, message-tags, 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 option irc.server.xxx." diff --git a/po/pt_BR.po b/po/pt_BR.po index ba5ae611d..9ee12b5cb 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: 2023-05-20 16:55+0200\n" +"POT-Creation-Date: 2023-05-23 15:52+0200\n" "PO-Revision-Date: 2023-05-01 20:23+0200\n" "Last-Translator: Érico Nogueira <ericonr@disroot.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7112,10 +7112,6 @@ msgid "" "%s%s: you must specify channel for \"%s\" command if you're not in a channel" msgstr "" -#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) -msgid "Notice" -msgstr "" - #, c-format msgid "" "%s%s: server must be specified because you are not on an irc server or " @@ -7271,6 +7267,10 @@ msgstr "" msgid "%s%s: you are not on channel \"%s\"" msgstr "" +#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) +msgid "Notice" +msgstr "" + msgid "find information about the administrator of the server" msgstr "" @@ -7483,8 +7483,9 @@ msgid "" "Without argument, \"ls\" and \"list\" are sent.\n" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, batch, " -"cap-notify, chghost, draft/multiline, extended-join, invite-notify, message-" -"tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"cap-notify, chghost, draft/multiline, echo-message, extended-join, invite-" +"notify, message-tags, 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 option irc.server.xxx." @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-05-20 16:55+0200\n" +"POT-Creation-Date: 2023-05-23 15:52+0200\n" "PO-Revision-Date: 2023-05-01 20:23+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6406,10 +6406,6 @@ msgid "" "%s%s: you must specify channel for \"%s\" command if you're not in a channel" msgstr "" -#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) -msgid "Notice" -msgstr "" - #, fuzzy, c-format msgid "" "%s%s: server must be specified because you are not on an irc server or " @@ -6578,6 +6574,10 @@ msgstr "" msgid "%s%s: you are not on channel \"%s\"" msgstr "%s не могу создать новый канал \"%s\"\n" +#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) +msgid "Notice" +msgstr "" + msgid "find information about the administrator of the server" msgstr "найти информацию об администрации сервера" @@ -6798,8 +6798,9 @@ msgid "" "Without argument, \"ls\" and \"list\" are sent.\n" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, batch, " -"cap-notify, chghost, draft/multiline, extended-join, invite-notify, message-" -"tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"cap-notify, chghost, draft/multiline, echo-message, extended-join, invite-" +"notify, message-tags, 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 option irc.server.xxx." @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-05-20 16:55+0200\n" +"POT-Creation-Date: 2023-05-23 15:52+0200\n" "PO-Revision-Date: 2023-05-14 15:29+0200\n" "Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8308,10 +8308,6 @@ msgid "" "%s%s: you must specify channel for \"%s\" command if you're not in a channel" msgstr "%s%s: ако нисте на каналу, морате да наведете канал за команду „%s”" -#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) -msgid "Notice" -msgstr "Notice" - #, c-format msgid "" "%s%s: server must be specified because you are not on an irc server or " @@ -8475,6 +8471,10 @@ msgstr "" msgid "%s%s: you are not on channel \"%s\"" msgstr "%s%s: нисте на каналу „%s”" +#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) +msgid "Notice" +msgstr "Notice" + msgid "find information about the administrator of the server" msgstr "проналажење информација о администратору сервера" @@ -8834,8 +8834,9 @@ msgid "" "Without argument, \"ls\" and \"list\" are sent.\n" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, batch, " -"cap-notify, chghost, draft/multiline, extended-join, invite-notify, message-" -"tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"cap-notify, chghost, draft/multiline, echo-message, extended-join, invite-" +"notify, message-tags, 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 option irc.server.xxx." @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-05-20 16:55+0200\n" +"POT-Creation-Date: 2023-05-23 15:52+0200\n" "PO-Revision-Date: 2023-05-01 20:23+0200\n" "Last-Translator: Emir SARI <emir_sari@icloud.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8554,10 +8554,6 @@ msgid "" msgstr "" "%s%s: Bir kanalda değilseniz \"%s\" komutu için bir kanal belirtmelisiniz" -#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) -msgid "Notice" -msgstr "Notice" - #, c-format msgid "" "%s%s: server must be specified because you are not on an irc server or " @@ -8719,6 +8715,10 @@ msgstr "" msgid "%s%s: you are not on channel \"%s\"" msgstr "%s%s: \"%s\" kanalında değilsiniz" +#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) +msgid "Notice" +msgstr "Notice" + msgid "find information about the administrator of the server" msgstr "sunucu yöneticisi hakkında bilgi bul" @@ -9101,8 +9101,9 @@ msgid "" "Without argument, \"ls\" and \"list\" are sent.\n" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, batch, " -"cap-notify, chghost, draft/multiline, extended-join, invite-notify, message-" -"tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"cap-notify, chghost, draft/multiline, echo-message, extended-join, invite-" +"notify, message-tags, 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 option irc.server.xxx." diff --git a/po/weechat.pot b/po/weechat.pot index e6f1fc07c..fb3107501 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: 2023-05-20 16:55+0200\n" +"POT-Creation-Date: 2023-05-23 15:52+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" @@ -5872,10 +5872,6 @@ msgid "" "%s%s: you must specify channel for \"%s\" command if you're not in a channel" msgstr "" -#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) -msgid "Notice" -msgstr "" - #, c-format msgid "" "%s%s: server must be specified because you are not on an irc server or " @@ -6030,6 +6026,10 @@ msgstr "" msgid "%s%s: you are not on channel \"%s\"" msgstr "" +#. TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) +msgid "Notice" +msgstr "" + msgid "find information about the administrator of the server" msgstr "" @@ -6236,8 +6236,9 @@ msgid "" "Without argument, \"ls\" and \"list\" are sent.\n" "\n" "Capabilities supported by WeeChat are: account-notify, away-notify, batch, " -"cap-notify, chghost, draft/multiline, extended-join, invite-notify, message-" -"tags, multi-prefix, server-time, setname, userhost-in-names.\n" +"cap-notify, chghost, draft/multiline, echo-message, extended-join, invite-" +"notify, message-tags, 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 option irc.server.xxx." diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 16727d4b9..d2faaa093 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -6927,8 +6927,9 @@ irc_command_init () "\n" "Capabilities supported by WeeChat are: " "account-notify, away-notify, batch, cap-notify, chghost, " - "draft/multiline, extended-join, invite-notify, message-tags, " - "multi-prefix, server-time, setname, userhost-in-names.\n" + "draft/multiline, echo-message, extended-join, invite-notify, " + "message-tags, 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 " diff --git a/src/plugins/irc/irc-command.h b/src/plugins/irc/irc-command.h index 1de161d98..8e55610c9 100644 --- a/src/plugins/irc/irc-command.h +++ b/src/plugins/irc/irc-command.h @@ -59,8 +59,8 @@ struct t_irc_channel; */ #define IRC_COMMAND_CAP_SUPPORTED \ "account-notify|away-notify|batch|cap-notify|chghost|" \ - "draft/multiline|extended-join|invite-notify|message-tags|" \ - "multi-prefix|server-time|setname|userhost-in-names" + "draft/multiline|echo-message|extended-join|invite-notify|" \ + "message-tags|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-input.c b/src/plugins/irc/irc-input.c index 8a3a971df..2c4e244e2 100644 --- a/src/plugins/irc/irc-input.c +++ b/src/plugins/irc/irc-input.c @@ -70,6 +70,15 @@ irc_input_user_message_display (struct t_gui_buffer *buffer, if (!buffer || !text) return; + IRC_BUFFER_GET_SERVER_CHANNEL(buffer); + + /* + * if capability "echo-message" is enabled, we don't display anything, + * the message will be displayed when server sends it back to us + */ + if (weechat_hashtable_has_key (ptr_server->cap_list, "echo-message")) + return; + /* if message is an action, force "action" to 1 and extract message */ if (strncmp (text, "\01ACTION ", 8) == 0) { @@ -87,8 +96,6 @@ irc_input_user_message_display (struct t_gui_buffer *buffer, (text2) ? text2 : text, weechat_config_boolean (irc_config_network_colors_send)); - IRC_BUFFER_GET_SERVER_CHANNEL(buffer); - if (ptr_channel) { ptr_nick = NULL; diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 6a7f184d6..d5ef2e489 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -3497,6 +3497,10 @@ IRC_PROTOCOL_CALLBACK(tagmsg) if (!tags) return WEECHAT_RC_OK; + /* ignore if coming from self nick (if echo-message is enabled) */ + if (irc_server_strcasecmp (server, server->nick, nick) == 0) + return WEECHAT_RC_OK; + ptr_channel = NULL; if (irc_channel_is_channel (server, params[0])) ptr_channel = irc_channel_search (server, params[0]); diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp index 4f7667251..b16818381 100644 --- a/tests/unit/plugins/irc/test-irc-protocol.cpp +++ b/tests/unit/plugins/irc/test-irc-protocol.cpp @@ -69,8 +69,8 @@ extern char *irc_protocol_cap_to_enable (const char *capabilities, "CHANTYPES=# CHANMODES=eIbq,k,flj,CFLMPQScgimnprstuz " \ "MONITOR=100 UTF8MAPPING=rfc8265 UTF8ONLY" #define IRC_ALL_CAPS "account-notify,away-notify,batch,cap-notify," \ - "chghost,draft/multiline,extended-join,invite-notify,message-tags," \ - "multi-prefix,server-time,setname,userhost-in-names" + "chghost,draft/multiline,echo-message,extended-join,invite-notify," \ + "message-tags,multi-prefix,server-time,setname,userhost-in-names" #define WEE_CHECK_CAP_TO_ENABLE(__result, __string, __sasl_requested) \ str = irc_protocol_cap_to_enable (__string, __sasl_requested); \ |