mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 13:56:37 +02:00
xfer: add option xfer.file.auto_accept_nicks (patch #7962)
This commit is contained in:
committed by
Sebastien Helleu
parent
1871a774f3
commit
fe512fdd33
@@ -20,6 +20,7 @@ Alphabetically:
|
||||
|
||||
* Ailin Nemui (Nei)
|
||||
* Aleksey V Zapparov
|
||||
* Andrew Potter
|
||||
* Arvydas Sidorenko
|
||||
* Benoit Papillault (benoit)
|
||||
* Dmitry Kobylin
|
||||
|
||||
@@ -93,6 +93,7 @@ Version 0.4.1 (under dev!)
|
||||
* scripts: create directories (language and language/autoload) on each action
|
||||
(install/remove/autoload), just in case they have been removed (bug #38473)
|
||||
* scripts: do not allow empty script name in function "register"
|
||||
* xfer: add option xfer.file.auto_accept_nicks (patch #7962)
|
||||
* xfer: fix freeze of DCC file received: use non-blocking socket after
|
||||
connection to sender and ensure the ACK is properly sent (bug #38340)
|
||||
|
||||
|
||||
@@ -53,6 +53,11 @@
|
||||
** Typ: boolesch
|
||||
** Werte: on, off (Standardwert: `off`)
|
||||
|
||||
* [[option_xfer.file.auto_accept_nicks]] *xfer.file.auto_accept_nicks*
|
||||
** Beschreibung: `comma-separated list of nicks for which the incoming files and chats are automatically accepted; format is "server.nick" (for a specific server) or "nick" (for all servers); example: "freenode.FlashCode,andrew"`
|
||||
** Typ: Zeichenkette
|
||||
** Werte: beliebige Zeichenkette (Standardwert: `""`)
|
||||
|
||||
* [[option_xfer.file.auto_rename]] *xfer.file.auto_rename*
|
||||
** Beschreibung: `eingehende Dateien werden automatisch umbenannt um ein Überschreiben zu vermeiden (dabei wird dem Dateinamen '.1', '.2', ... hinzugefügt)`
|
||||
** Typ: boolesch
|
||||
|
||||
@@ -53,6 +53,11 @@
|
||||
** type: boolean
|
||||
** values: on, off (default value: `off`)
|
||||
|
||||
* [[option_xfer.file.auto_accept_nicks]] *xfer.file.auto_accept_nicks*
|
||||
** description: `comma-separated list of nicks for which the incoming files and chats are automatically accepted; format is "server.nick" (for a specific server) or "nick" (for all servers); example: "freenode.FlashCode,andrew"`
|
||||
** type: string
|
||||
** values: any string (default value: `""`)
|
||||
|
||||
* [[option_xfer.file.auto_rename]] *xfer.file.auto_rename*
|
||||
** description: `rename incoming files if already exists (add ".1", ".2", ...)`
|
||||
** type: boolean
|
||||
|
||||
@@ -53,6 +53,11 @@
|
||||
** type: booléen
|
||||
** valeurs: on, off (valeur par défaut: `off`)
|
||||
|
||||
* [[option_xfer.file.auto_accept_nicks]] *xfer.file.auto_accept_nicks*
|
||||
** description: `liste de pseudos (séparés par des virgules) pour lesquels les demandes d'envoi de fichiers et de discussion sont automatiquement acceptées; le format est "serveur.pseudo" (pour un serveur spécifique) ou "pseudo" (pour tous les serveurs); exemple: "freenode.FlashCode,andrew"`
|
||||
** type: chaîne
|
||||
** valeurs: toute chaîne (valeur par défaut: `""`)
|
||||
|
||||
* [[option_xfer.file.auto_rename]] *xfer.file.auto_rename*
|
||||
** description: `renommer les fichiers reçus s'ils existent déjà (ajoute ".1", ".2", ...)`
|
||||
** type: booléen
|
||||
|
||||
@@ -53,6 +53,11 @@
|
||||
** tipo: bool
|
||||
** valori: on, off (valore predefinito: `off`)
|
||||
|
||||
* [[option_xfer.file.auto_accept_nicks]] *xfer.file.auto_accept_nicks*
|
||||
** descrizione: `comma-separated list of nicks for which the incoming files and chats are automatically accepted; format is "server.nick" (for a specific server) or "nick" (for all servers); example: "freenode.FlashCode,andrew"`
|
||||
** tipo: stringa
|
||||
** valori: qualsiasi stringa (valore predefinito: `""`)
|
||||
|
||||
* [[option_xfer.file.auto_rename]] *xfer.file.auto_rename*
|
||||
** descrizione: `rinomina i file in ingresso se esistenti (aggiunge ".1", ".2", ...)`
|
||||
** tipo: bool
|
||||
|
||||
@@ -53,6 +53,11 @@
|
||||
** タイプ: ブール
|
||||
** 値: on, off (デフォルト値: `off`)
|
||||
|
||||
* [[option_xfer.file.auto_accept_nicks]] *xfer.file.auto_accept_nicks*
|
||||
** 説明: `comma-separated list of nicks for which the incoming files and chats are automatically accepted; format is "server.nick" (for a specific server) or "nick" (for all servers); example: "freenode.FlashCode,andrew"`
|
||||
** タイプ: 文字列
|
||||
** 値: 未制約文字列 (デフォルト値: `""`)
|
||||
|
||||
* [[option_xfer.file.auto_rename]] *xfer.file.auto_rename*
|
||||
** 説明: `既に存在する場合、受信ファイルをリネームする (".1"、".2"、...を追加)`
|
||||
** タイプ: ブール
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.4.1-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2013-03-24 12:25+0100\n"
|
||||
"POT-Creation-Date: 2013-03-25 09:00+0100\n"
|
||||
"PO-Revision-Date: 2013-03-16 17:49+0100\n"
|
||||
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -9311,6 +9311,12 @@ msgstr "automaticky akceptovat příchozí soubory (používejte opatrně!)"
|
||||
msgid "automatically accept chat requests (use carefully!)"
|
||||
msgstr "automaticky akceptovat požadavek o rozhovor (používejte opatrně!)"
|
||||
|
||||
msgid ""
|
||||
"comma-separated list of nicks for which the incoming files and chats are "
|
||||
"automatically accepted; format is \"server.nick\" (for a specific server) or "
|
||||
"\"nick\" (for all servers); example: \"freenode.FlashCode,andrew\""
|
||||
msgstr ""
|
||||
|
||||
msgid "list of xfer"
|
||||
msgstr "seznam xfer"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.4.1-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2013-03-24 12:25+0100\n"
|
||||
"POT-Creation-Date: 2013-03-25 09:00+0100\n"
|
||||
"PO-Revision-Date: 2013-03-17 08:20+0100\n"
|
||||
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
|
||||
"Language-Team: German <weechatter@arcor.de>\n"
|
||||
@@ -10195,6 +10195,12 @@ msgstr "eine Datenübertragung wird automatisch angenommen (Vorsicht!)"
|
||||
msgid "automatically accept chat requests (use carefully!)"
|
||||
msgstr "eine Chat-Anfrage wird automatisch akzeptiert (Vorsicht!)"
|
||||
|
||||
msgid ""
|
||||
"comma-separated list of nicks for which the incoming files and chats are "
|
||||
"automatically accepted; format is \"server.nick\" (for a specific server) or "
|
||||
"\"nick\" (for all servers); example: \"freenode.FlashCode,andrew\""
|
||||
msgstr ""
|
||||
|
||||
msgid "list of xfer"
|
||||
msgstr "Transferliste"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.4.1-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2013-03-24 12:25+0100\n"
|
||||
"POT-Creation-Date: 2013-03-25 09:00+0100\n"
|
||||
"PO-Revision-Date: 2013-03-17 08:20+0100\n"
|
||||
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -9558,6 +9558,12 @@ msgstr ""
|
||||
"aceptar automáticamente peticiones de conversación (¡utilizar con "
|
||||
"precaución!)"
|
||||
|
||||
msgid ""
|
||||
"comma-separated list of nicks for which the incoming files and chats are "
|
||||
"automatically accepted; format is \"server.nick\" (for a specific server) or "
|
||||
"\"nick\" (for all servers); example: \"freenode.FlashCode,andrew\""
|
||||
msgstr ""
|
||||
|
||||
msgid "list of xfer"
|
||||
msgstr "lista de transferencias"
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.4.1-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2013-03-24 12:58+0100\n"
|
||||
"PO-Revision-Date: 2013-03-24 12:26+0100\n"
|
||||
"POT-Creation-Date: 2013-03-25 09:00+0100\n"
|
||||
"PO-Revision-Date: 2013-03-25 09:01+0100\n"
|
||||
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: fr\n"
|
||||
@@ -9929,6 +9929,16 @@ msgstr ""
|
||||
"accepte automatiquement les demandes de discussion (à utiliser avec "
|
||||
"précaution !)"
|
||||
|
||||
msgid ""
|
||||
"comma-separated list of nicks for which the incoming files and chats are "
|
||||
"automatically accepted; format is \"server.nick\" (for a specific server) or "
|
||||
"\"nick\" (for all servers); example: \"freenode.FlashCode,andrew\""
|
||||
msgstr ""
|
||||
"liste de pseudos (séparés par des virgules) pour lesquels les demandes "
|
||||
"d'envoi de fichiers et de discussion sont automatiquement acceptées; le "
|
||||
"format est \"serveur.pseudo\" (pour un serveur spécifique) ou \"pseudo"
|
||||
"\" (pour tous les serveurs); exemple: \"freenode.FlashCode,andrew\""
|
||||
|
||||
msgid "list of xfer"
|
||||
msgstr "liste des xfer"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.4.1-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2013-03-24 12:25+0100\n"
|
||||
"POT-Creation-Date: 2013-03-25 09:00+0100\n"
|
||||
"PO-Revision-Date: 2013-03-16 17:50+0100\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -8776,6 +8776,12 @@ msgstr "dcc beszélgetések automatikus fogadása (óvatosan használja!)"
|
||||
msgid "automatically accept chat requests (use carefully!)"
|
||||
msgstr "dcc beszélgetések automatikus fogadása (óvatosan használja!)"
|
||||
|
||||
msgid ""
|
||||
"comma-separated list of nicks for which the incoming files and chats are "
|
||||
"automatically accepted; format is \"server.nick\" (for a specific server) or "
|
||||
"\"nick\" (for all servers); example: \"freenode.FlashCode,andrew\""
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "list of xfer"
|
||||
msgstr "Aliaszok listája:\n"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.4.1-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2013-03-24 12:25+0100\n"
|
||||
"POT-Creation-Date: 2013-03-25 09:00+0100\n"
|
||||
"PO-Revision-Date: 2013-03-17 08:20+0100\n"
|
||||
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -9587,6 +9587,12 @@ msgstr "accetta automaticamente i file in arrivo (usare con cautela!)"
|
||||
msgid "automatically accept chat requests (use carefully!)"
|
||||
msgstr "accetta automaticamente le richieste di chat (usare con cautela!)"
|
||||
|
||||
msgid ""
|
||||
"comma-separated list of nicks for which the incoming files and chats are "
|
||||
"automatically accepted; format is \"server.nick\" (for a specific server) or "
|
||||
"\"nick\" (for all servers); example: \"freenode.FlashCode,andrew\""
|
||||
msgstr ""
|
||||
|
||||
msgid "list of xfer"
|
||||
msgstr "elenco di xfer"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.4.1-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2013-03-24 12:25+0100\n"
|
||||
"POT-Creation-Date: 2013-03-25 09:00+0100\n"
|
||||
"PO-Revision-Date: 2013-03-17 08:20+0100\n"
|
||||
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
|
||||
"Language-Team: Japanese <https://github.com/l/WeeChat>\n"
|
||||
@@ -9578,6 +9578,12 @@ msgstr "ファイルを自動的に受信 (注意して使用!)"
|
||||
msgid "automatically accept chat requests (use carefully!)"
|
||||
msgstr "チャット要求を自動的に許可 (注意して使用!)"
|
||||
|
||||
msgid ""
|
||||
"comma-separated list of nicks for which the incoming files and chats are "
|
||||
"automatically accepted; format is \"server.nick\" (for a specific server) or "
|
||||
"\"nick\" (for all servers); example: \"freenode.FlashCode,andrew\""
|
||||
msgstr ""
|
||||
|
||||
msgid "list of xfer"
|
||||
msgstr "xfer のリスト"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.4.1-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2013-03-24 12:25+0100\n"
|
||||
"POT-Creation-Date: 2013-03-25 09:00+0100\n"
|
||||
"PO-Revision-Date: 2013-03-17 08:20+0100\n"
|
||||
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -9732,6 +9732,12 @@ msgstr "automatycznie akceptuj pliki przychodzące (ostrożnie!)"
|
||||
msgid "automatically accept chat requests (use carefully!)"
|
||||
msgstr "automatycznie akceptuj prośby o rozmowę (ostrożnie!)"
|
||||
|
||||
msgid ""
|
||||
"comma-separated list of nicks for which the incoming files and chats are "
|
||||
"automatically accepted; format is \"server.nick\" (for a specific server) or "
|
||||
"\"nick\" (for all servers); example: \"freenode.FlashCode,andrew\""
|
||||
msgstr ""
|
||||
|
||||
msgid "list of xfer"
|
||||
msgstr "lista xfer"
|
||||
|
||||
|
||||
+7
-1
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.4.1-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2013-03-24 12:25+0100\n"
|
||||
"POT-Creation-Date: 2013-03-25 09:00+0100\n"
|
||||
"PO-Revision-Date: 2013-03-17 08:20+0100\n"
|
||||
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -8943,6 +8943,12 @@ msgstr "aceitar automaticamente arquivos enviados a mim (use com cuidado!)"
|
||||
msgid "automatically accept chat requests (use carefully!)"
|
||||
msgstr "aceitar automaticamente requisições de chat (use com cuidado!)"
|
||||
|
||||
msgid ""
|
||||
"comma-separated list of nicks for which the incoming files and chats are "
|
||||
"automatically accepted; format is \"server.nick\" (for a specific server) or "
|
||||
"\"nick\" (for all servers); example: \"freenode.FlashCode,andrew\""
|
||||
msgstr ""
|
||||
|
||||
msgid "list of xfer"
|
||||
msgstr "lista de transferência"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.4.1-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2013-03-24 12:25+0100\n"
|
||||
"POT-Creation-Date: 2013-03-25 09:00+0100\n"
|
||||
"PO-Revision-Date: 2013-03-16 17:50+0100\n"
|
||||
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -8796,6 +8796,12 @@ msgstr "автоматически подтверждать dcc-чат (испо
|
||||
msgid "automatically accept chat requests (use carefully!)"
|
||||
msgstr "автоматически подтверждать dcc-чат (используйте осторожно!)"
|
||||
|
||||
msgid ""
|
||||
"comma-separated list of nicks for which the incoming files and chats are "
|
||||
"automatically accepted; format is \"server.nick\" (for a specific server) or "
|
||||
"\"nick\" (for all servers); example: \"freenode.FlashCode,andrew\""
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "list of xfer"
|
||||
msgstr "Список сокращений:\n"
|
||||
|
||||
+7
-1
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.4.1-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2013-03-24 12:25+0100\n"
|
||||
"POT-Creation-Date: 2013-03-25 09:00+0100\n"
|
||||
"PO-Revision-Date: 2013-02-14 18:20+0100\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -7776,6 +7776,12 @@ msgstr ""
|
||||
msgid "automatically accept chat requests (use carefully!)"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"comma-separated list of nicks for which the incoming files and chats are "
|
||||
"automatically accepted; format is \"server.nick\" (for a specific server) or "
|
||||
"\"nick\" (for all servers); example: \"freenode.FlashCode,andrew\""
|
||||
msgstr ""
|
||||
|
||||
msgid "list of xfer"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ struct t_config_option *xfer_config_file_auto_rename;
|
||||
struct t_config_option *xfer_config_file_auto_resume;
|
||||
struct t_config_option *xfer_config_file_auto_accept_files;
|
||||
struct t_config_option *xfer_config_file_auto_accept_chats;
|
||||
struct t_config_option *xfer_config_file_auto_accept_nicks;
|
||||
|
||||
|
||||
|
||||
@@ -304,6 +305,14 @@ xfer_config_init ()
|
||||
"auto_accept_chats", "boolean",
|
||||
N_("automatically accept chat requests (use carefully!)"),
|
||||
NULL, 0, 0, "off", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
xfer_config_file_auto_accept_nicks = weechat_config_new_option (
|
||||
xfer_config_file, ptr_section,
|
||||
"auto_accept_nicks", "string",
|
||||
N_("comma-separated list of nicks for which the incoming files and "
|
||||
"chats are automatically accepted; format is \"server.nick\" (for a "
|
||||
"specific server) or \"nick\" (for all servers); example: "
|
||||
"\"freenode.FlashCode,andrew\""),
|
||||
NULL, 0, 0, "", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ extern struct t_config_option *xfer_config_file_auto_rename;
|
||||
extern struct t_config_option *xfer_config_file_auto_resume;
|
||||
extern struct t_config_option *xfer_config_file_auto_accept_files;
|
||||
extern struct t_config_option *xfer_config_file_auto_accept_chats;
|
||||
extern struct t_config_option *xfer_config_file_auto_accept_nicks;
|
||||
|
||||
extern int xfer_config_init ();
|
||||
extern int xfer_config_read ();
|
||||
|
||||
+60
-4
@@ -519,6 +519,53 @@ xfer_alloc ()
|
||||
return new_xfer;
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if the given server/nick is auto-accepted.
|
||||
*
|
||||
* Returns:
|
||||
* 1: nick auto-accepted
|
||||
* 0: nick not auto-accepted
|
||||
*/
|
||||
|
||||
int
|
||||
xfer_nick_auto_accepted (const char *server, const char *nick)
|
||||
{
|
||||
int rc, num_nicks, i;
|
||||
char **nicks, *pos;
|
||||
|
||||
rc = 0;
|
||||
|
||||
nicks = weechat_string_split (weechat_config_string (xfer_config_file_auto_accept_nicks),
|
||||
",", 0, 0, &num_nicks);
|
||||
if (nicks)
|
||||
{
|
||||
for (i = 0; i < num_nicks; i++)
|
||||
{
|
||||
pos = strchr (nicks[i], '.');
|
||||
if (pos)
|
||||
{
|
||||
if ((weechat_strncasecmp (server, nicks[i], pos - nicks[i]) == 0)
|
||||
&& (weechat_strcasecmp (nick, pos + 1) == 0))
|
||||
{
|
||||
rc = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (weechat_strcasecmp (nick, nicks[i]) == 0)
|
||||
{
|
||||
rc = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
weechat_string_free_split (nicks);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds a xfer to list.
|
||||
*
|
||||
@@ -678,13 +725,22 @@ xfer_new (const char *plugin_name, const char *plugin_id,
|
||||
}
|
||||
}
|
||||
|
||||
if ( ( (type == XFER_TYPE_FILE_RECV)
|
||||
&& (weechat_config_boolean (xfer_config_file_auto_accept_files)) )
|
||||
|| ( (type == XFER_TYPE_CHAT_RECV)
|
||||
&& (weechat_config_boolean (xfer_config_file_auto_accept_chats)) ) )
|
||||
/*
|
||||
* auto-accept file/chat if nick is auto-accepted, or if file/chat is
|
||||
* auto-accepted
|
||||
*/
|
||||
if (xfer_nick_auto_accepted (new_xfer->plugin_id, new_xfer->remote_nick)
|
||||
|| ((type == XFER_TYPE_FILE_RECV)
|
||||
&& weechat_config_boolean (xfer_config_file_auto_accept_files))
|
||||
|| ((type == XFER_TYPE_CHAT_RECV)
|
||||
&& weechat_config_boolean (xfer_config_file_auto_accept_chats)))
|
||||
{
|
||||
xfer_network_accept (new_xfer);
|
||||
}
|
||||
else
|
||||
{
|
||||
xfer_buffer_refresh (WEECHAT_HOTLIST_PRIVATE);
|
||||
}
|
||||
|
||||
return new_xfer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user