1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 00:33:13 +02:00

irc: search options irc.ctcp.* with lower case ctcp string

This commit is contained in:
Sébastien Helleu
2023-04-05 20:36:06 +02:00
parent e75c61d7aa
commit b6a59be317
8 changed files with 49 additions and 3 deletions
+5
View File
@@ -3994,6 +3994,11 @@ folgenden Befehl:
/set irc.ctcp.version "I'm running WeeChat $version, it rocks!"
----
// TRANSLATION MISSING
[NOTE]
The name of CTCP must be in lower case. That means option _irc.ctcp.VERSION_
would not work.
Wenn Sie die Anfrage CTCP "VERSION" blockieren möchten (es wird nicht darauf
geantwortet) dann löschen Sie einfach den Rückgabe-String:
+4
View File
@@ -3918,6 +3918,10 @@ For example, to customize reply to CTCP "VERSION", use following command:
/set irc.ctcp.version "I'm running WeeChat $version, it rocks!"
----
[NOTE]
The name of CTCP must be in lower case. That means option _irc.ctcp.VERSION_
would not work.
If you want to block CTCP "VERSION" (do not reply to a query), then set empty
string:
+4
View File
@@ -4036,6 +4036,10 @@ commande suivante :
/set irc.ctcp.version "Je suis sous WeeChat $version, ça déchire !"
----
[NOTE]
Le nom du CTCP doit être en minuscules. Cela signifie que l'option
_irc.ctcp.VERSION_ ne fonctionnerait pas.
Si vous voulez bloquer le CTCP "VERSION" (ne pas répondre à une demande), alors
affectez une chaîne vide :
+5
View File
@@ -4227,6 +4227,11 @@ seguente comando:
/set irc.ctcp.version "Uso WeeChat $version, fico!"
----
// TRANSLATION MISSING
[NOTE]
The name of CTCP must be in lower case. That means option _irc.ctcp.VERSION_
would not work.
Se si desidera bloccare CTCP "VERSIONE" (non rispondere ad una query),
allora basta impostare una stringa vuota:
+5
View File
@@ -4081,6 +4081,11 @@ CTCP 応答をカスタマイズしたり、いくつかの CTCP
/set irc.ctcp.version "I'm running WeeChat $version, it rocks!"
----
// TRANSLATION MISSING
[NOTE]
The name of CTCP must be in lower case. That means option _irc.ctcp.VERSION_
would not work.
CTCP "VERSION" 要求をブロックする (要求に対する応答を行わない)
には、空文字列を設定してください:
+5
View File
@@ -3967,6 +3967,11 @@ pomocą polecenia:
/set irc.ctcp.version "I'm running WeeChat $version, it rocks!"
----
// TRANSLATION MISSING
[NOTE]
The name of CTCP must be in lower case. That means option _irc.ctcp.VERSION_
would not work.
Jeśli chcesz zablokować CTCP "VERSION" (nie odpowiadać na zapytanie), ustaw
pusty ciąg:
+5
View File
@@ -3706,6 +3706,11 @@ CTCP одговори могу да се прилагоде, или неки CTC
/set irc.ctcp.version "Користим WeeChat $version, одличан је!"
----
// TRANSLATION MISSING
[NOTE]
The name of CTCP must be in lower case. That means option _irc.ctcp.VERSION_
would not work.
Ако желите да блокирате CTCP „VERSION” (да се не пошаље одговор на овај упит), онда поставите празан стринг:
----
+16 -3
View File
@@ -79,23 +79,36 @@ const char *
irc_ctcp_get_reply (struct t_irc_server *server, const char *ctcp)
{
struct t_config_option *ptr_option;
char option_name[512];
char option_name[512], *ctcp_lower;
snprintf (option_name, sizeof (option_name), "%s.%s", server->name, ctcp);
ctcp_lower = weechat_string_tolower (ctcp);
if (!ctcp_lower)
return NULL;
snprintf (option_name, sizeof (option_name),
"%s.%s", server->name, ctcp_lower);
/* search for CTCP in configuration file, for server */
ptr_option = weechat_config_search_option (irc_config_file,
irc_config_section_ctcp,
option_name);
if (ptr_option)
{
free (ctcp_lower);
return weechat_config_string (ptr_option);
}
/* search for CTCP in configuration file */
ptr_option = weechat_config_search_option (irc_config_file,
irc_config_section_ctcp,
ctcp);
ctcp_lower);
if (ptr_option)
{
free (ctcp_lower);
return weechat_config_string (ptr_option);
}
free (ctcp_lower);
/*
* no CTCP reply found in config, then return default reply, or NULL