diff options
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | po/cs.po | 12 | ||||
-rw-r--r-- | po/de.po | 47 | ||||
-rw-r--r-- | po/es.po | 12 | ||||
-rw-r--r-- | po/fr.po | 15 | ||||
-rw-r--r-- | po/hu.po | 11 | ||||
-rw-r--r-- | po/it.po | 12 | ||||
-rw-r--r-- | po/ja.po | 12 | ||||
-rw-r--r-- | po/pl.po | 12 | ||||
-rw-r--r-- | po/pt.po | 12 | ||||
-rw-r--r-- | po/pt_BR.po | 11 | ||||
-rw-r--r-- | po/ru.po | 11 | ||||
-rw-r--r-- | po/sr.po | 12 | ||||
-rw-r--r-- | po/tr.po | 12 | ||||
-rw-r--r-- | po/weechat.pot | 11 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 38 | ||||
-rw-r--r-- | src/plugins/xfer/xfer.c | 2 |
17 files changed, 196 insertions, 47 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 72a0ee93f..ee2af9d74 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -23,6 +23,7 @@ New features:: * core: add option weechat.look.highlight_disable_regex and buffer property "highlight_disable_regex" (issue #1798) * api: rename function string_build_with_split_string to string_rebuild_split_string, add arguments "index_start" and "index_end" * api: add info "uptime_current" + * irc: display an error message when using command /dcc without xfer plugin loaded Bug fixes:: @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2022-07-24 22:18+0200\n" +"POT-Creation-Date: 2022-07-27 21:18+0200\n" "PO-Revision-Date: 2022-06-18 16:11+0200\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6497,6 +6497,16 @@ msgstr "%s%s: \"%s\" příkaz nemůže být spuštěn v bufferu serveru" msgid "%s%s: unable to resolve local address of server socket: error %d %s" msgstr "%s%s: nemohu nastavit \"neblokovaci\" volbu na soket" +#, fuzzy, c-format +#| msgid "%s%s: unable to create socket" +msgid "%s%s: unable to create DCC" +msgstr "%s%s: nemohu vytvořit soket" + +#, c-format +msgid "" +"%s%s: unable to create DCC, please check that the \"xfer\" plugin is loaded" +msgstr "" + #, c-format msgid "%s%s: not connected to server \"%s\"!" msgstr "%s%s: nepřipojen k serveru \"%s\"!" @@ -25,7 +25,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2022-07-24 22:18+0200\n" +"POT-Creation-Date: 2022-07-27 22:06+0200\n" "PO-Revision-Date: 2022-07-26 13:43+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <kde-i18n-de@kde.org>\n" @@ -4245,13 +4245,6 @@ msgstr "" "werden). Schlagwörter können mit \"*\", als Joker, beginnen oder enden; " "Beispiel: \"test,(?-i)*toto*,flash*\"" -#| msgid "" -#| "POSIX extended regular expression used to check if a message has " -#| "highlight or not, at least one match in string must be surrounded by " -#| "delimiters (chars different from: alphanumeric, \"-\", \"_\" and \"|\"), " -#| "regular expression is case insensitive (use \"(?-i)\" at beginning to " -#| "make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)FlashCode|" -#| "flashy\"" msgid "" "POSIX extended regular expression used to prevent any highlight from a " "message: this option has higher priority over other highlight options (if " @@ -4260,15 +4253,14 @@ msgid "" "at beginning to make it case sensitive), examples: \"<flash.*>\", \"(?-" "i)<Flash.*>\"" msgstr "" -"Erweiterter regulärer POSIX-Ausdruck, der verwendet wird, um jede" -" Hervorhebung von einer Nachricht zu verhindern: Diese Option hat eine höhere" -" Priorität als andere Hervorhebungsoptionen (sofern die " -"Zeichenkette in der Nachricht gefunden wird, die Hervorhebung deaktiviert ist" -" und die andere" -"Optionen ignoriert werden), bei regulären Ausdrücken wird die" -" Groß-/Kleinschreibung nicht beachtet (verwenden Sie \"(?-i)\" am Anfang, um" -" Groß- und Kleinschreibung zu beachten), Beispiele: \"<flash.*>\", \"(?-" -"i)<Flash.*>\"" +"Erweiterter regulärer POSIX-Ausdruck, der verwendet wird, um jede " +"Hervorhebung von einer Nachricht zu verhindern: Diese Option hat eine höhere " +"Priorität als andere Hervorhebungsoptionen (sofern die Zeichenkette in der " +"Nachricht gefunden wird, die Hervorhebung deaktiviert ist und die " +"andereOptionen ignoriert werden), bei regulären Ausdrücken wird die Groß-/" +"Kleinschreibung nicht beachtet (verwenden Sie \"(?-i)\" am Anfang, um Groß- " +"und Kleinschreibung zu beachten), Beispiele: \"<flash.*>\", \"(?-i)<Flash." +"*>\"" msgid "" "POSIX extended regular expression used to check if a message has highlight " @@ -8219,6 +8211,16 @@ msgstr "" "%s%s: lokale Adresse des Server Socket kann nicht aufgelöst werden: Fehler " "%d %s" +#, fuzzy, c-format +#| msgid "%s%s: unable to create socket" +msgid "%s%s: unable to create DCC" +msgstr "%s%s: Socket kann nicht erstellt werden" + +#, c-format +msgid "" +"%s%s: unable to create DCC, please check that the \"xfer\" plugin is loaded" +msgstr "" + #, c-format msgid "%s%s: not connected to server \"%s\"!" msgstr "%s%s: Keine Verbindung zum Server \"%s\"!" @@ -12966,13 +12968,12 @@ msgid "\"days\" (number of days) or \"seconds\" (number of seconds) (optional)" msgstr "" "\"days\" (Anzahl der Tage) oder \"seconds\" (Anzahl der Sekunden) (optional)" -#| msgid "WeeChat uptime (format: \"days:hh:mm:ss\")" msgid "" "WeeChat uptime for the current process only (upgrades with /upgrade command " "are ignored) (format: \"days:hh:mm:ss\")" msgstr "" -"WeeChat-Betriebszeit für den aktuellen Prozess (Upgrades mit /upgrade Befehl" -"werden ignoriert) (Format: \"Tage:hh:mm:ss\")" +"WeeChat-Betriebszeit für den aktuellen Prozess (Upgrades mit /upgrade " +"Befehlwerden ignoriert) (Format: \"Tage:hh:mm:ss\")" msgid "generate a Time-based One-Time Password (TOTP)" msgstr "generiert ein Time-based One-Time Passwort (TOTP)" @@ -15355,8 +15356,7 @@ msgstr "verwaltet Trigger, das Schweizer Armeemesser für WeeChat" msgid "" "list|listfull|listdefault || add|addoff|addreplace <name> <hook> " -"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<" -"return_code>\" [\"<post_action>\"]]]]]] " +"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] " "|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> " "<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|-" "all [<name>...]] || restart <name>|-all [<name>...] || show <name> || del " @@ -15364,8 +15364,7 @@ msgid "" "monitor [<filter>]" msgstr "" "list|listfull|listdefault || add|addoff|addreplace <name> <hook> " -"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<" -"return_code>\" [\"<post_action>\"]]]]]] " +"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] " "|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> " "<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|-" "all [<name>...]] || restart <name>|-all [<name>...] || show <name> || del " @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2022-07-24 22:18+0200\n" +"POT-Creation-Date: 2022-07-27 21:18+0200\n" "PO-Revision-Date: 2022-06-18 16:11+0200\n" "Last-Translator: Santiago Forero <santiago@forero.xyz>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7064,6 +7064,16 @@ msgstr "%s%s: el comando \"%s\" no puede ejecutarse en el buffer del servidor" msgid "%s%s: unable to resolve local address of server socket: error %d %s" msgstr "%s%s: no es posible configurar la opción \"nonblock\" para el socket" +#, fuzzy, c-format +#| msgid "%s%s: unable to create socket" +msgid "%s%s: unable to create DCC" +msgstr "%s%s: no es posible crear el socket" + +#, c-format +msgid "" +"%s%s: unable to create DCC, please check that the \"xfer\" plugin is loaded" +msgstr "" + #, c-format msgid "%s%s: not connected to server \"%s\"!" msgstr "%s%s: ¡no conectado al servidor \"%s\"!" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2022-07-24 22:18+0200\n" -"PO-Revision-Date: 2022-07-24 22:19+0200\n" +"POT-Creation-Date: 2022-07-27 21:18+0200\n" +"PO-Revision-Date: 2022-07-27 21:41+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -8042,6 +8042,17 @@ msgstr "" "%s%s : impossible de résoudre l'adresse locale du socket : erreur %d %s" #, c-format +msgid "%s%s: unable to create DCC" +msgstr "%s%s : impossible de créer le DCC" + +#, c-format +msgid "" +"%s%s: unable to create DCC, please check that the \"xfer\" plugin is loaded" +msgstr "" +"%s%s : impossible de créer le DCC, merci de vérifier que l'extension " +"\"xfer\" est bien chargée" + +#, c-format msgid "%s%s: not connected to server \"%s\"!" msgstr "%s%s : non connecté au serveur \"%s\" !" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2022-07-24 22:18+0200\n" +"POT-Creation-Date: 2022-07-27 21:18+0200\n" "PO-Revision-Date: 2022-04-24 10:20+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6038,6 +6038,15 @@ msgid "%s%s: unable to resolve local address of server socket: error %d %s" msgstr "%s DCC: nem sikerült 'nonblock' opciót beállítani a csatornán\n" #, fuzzy, c-format +msgid "%s%s: unable to create DCC" +msgstr "%s nem sikerült a szervert létrehozni\n" + +#, c-format +msgid "" +"%s%s: unable to create DCC, please check that the \"xfer\" plugin is loaded" +msgstr "" + +#, fuzzy, c-format msgid "%s%s: not connected to server \"%s\"!" msgstr "%s nincs csatlakozva a \"%s\" szerverhez!\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2022-07-24 22:18+0200\n" +"POT-Creation-Date: 2022-07-27 21:18+0200\n" "PO-Revision-Date: 2022-04-24 10:20+0200\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6838,6 +6838,16 @@ msgstr "" "%s%s: impossibile impostare l'opzione \"nonblock\" per il socket: errore %d " "%s" +#, fuzzy, c-format +#| msgid "%s%s: unable to create socket" +msgid "%s%s: unable to create DCC" +msgstr "%s%s: impossibile creare il socket" + +#, c-format +msgid "" +"%s%s: unable to create DCC, please check that the \"xfer\" plugin is loaded" +msgstr "" + #, c-format msgid "%s%s: not connected to server \"%s\"!" msgstr "%s%s: non connesso al server \"%s\"!" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2022-07-24 22:18+0200\n" +"POT-Creation-Date: 2022-07-27 21:18+0200\n" "PO-Revision-Date: 2022-06-18 16:12+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" @@ -7661,6 +7661,16 @@ msgstr "%s%s: \"%s\" コマンドはサーババッファでは実行できま msgid "%s%s: unable to resolve local address of server socket: error %d %s" msgstr "%s%s: サーバソケットのローカルアドレスを解決できません: エラー %d %s" +#, fuzzy, c-format +#| msgid "%s%s: unable to create socket" +msgid "%s%s: unable to create DCC" +msgstr "%s%s: ソケットの作成に失敗" + +#, c-format +msgid "" +"%s%s: unable to create DCC, please check that the \"xfer\" plugin is loaded" +msgstr "" + #, c-format msgid "%s%s: not connected to server \"%s\"!" 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: 2022-07-24 22:18+0200\n" +"POT-Creation-Date: 2022-07-27 21:18+0200\n" "PO-Revision-Date: 2022-06-18 16:12+0200\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: Polish <kde-i18n-doc@kde.org>\n" @@ -7991,6 +7991,16 @@ msgid "%s%s: unable to resolve local address of server socket: error %d %s" msgstr "" "%s%s: nie można odczytać lokalnego adresu serwera dla gniazda: błąd %d %s" +#, fuzzy, c-format +#| msgid "%s%s: unable to create socket" +msgid "%s%s: unable to create DCC" +msgstr "%s%s: nie można utworzyć gniazda" + +#, c-format +msgid "" +"%s%s: unable to create DCC, please check that the \"xfer\" plugin is loaded" +msgstr "" + #, c-format msgid "%s%s: not connected to server \"%s\"!" msgstr "%s%s: nie połączony z serwerem \"%s\"!" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2022-07-24 22:18+0200\n" +"POT-Creation-Date: 2022-07-27 21:18+0200\n" "PO-Revision-Date: 2022-06-18 16:12+0200\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -7440,6 +7440,16 @@ msgid "%s%s: unable to resolve local address of server socket: error %d %s" msgstr "" "%s%s: não foi possível resolver o endereço do socket do servidor: erro %d %s" +#, fuzzy, c-format +#| msgid "%s%s: unable to create socket" +msgid "%s%s: unable to create DCC" +msgstr "%s%s: não foi possível criar socket" + +#, c-format +msgid "" +"%s%s: unable to create DCC, please check that the \"xfer\" plugin is loaded" +msgstr "" + #, c-format msgid "%s%s: not connected to server \"%s\"!" msgstr "%s%s: não está conectado ao servidor \"%s\"!" diff --git a/po/pt_BR.po b/po/pt_BR.po index ee00e9702..89f2a15a9 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: 2022-07-24 22:18+0200\n" +"POT-Creation-Date: 2022-07-27 21:18+0200\n" "PO-Revision-Date: 2022-04-24 10:20+0200\n" "Last-Translator: Érico Nogueira <ericonr@disroot.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6729,6 +6729,15 @@ msgstr "" msgid "%s%s: unable to resolve local address of server socket: error %d %s" msgstr "%s%s: não foi possível setar opção \"nonblock\" para o socket" +#, fuzzy, c-format +msgid "%s%s: unable to create DCC" +msgstr "%s%s: não foi possível criar pipe" + +#, c-format +msgid "" +"%s%s: unable to create DCC, please check that the \"xfer\" plugin is loaded" +msgstr "" + #, c-format msgid "%s%s: not connected to server \"%s\"!" msgstr "" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2022-07-24 22:18+0200\n" +"POT-Creation-Date: 2022-07-27 21:18+0200\n" "PO-Revision-Date: 2022-04-24 10:20+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6076,6 +6076,15 @@ msgid "%s%s: unable to resolve local address of server socket: error %d %s" msgstr "%s DCC: не могу установить неблокирующий режим для сокета\n" #, fuzzy, c-format +msgid "%s%s: unable to create DCC" +msgstr "%s не могу создать сервер\n" + +#, c-format +msgid "" +"%s%s: unable to create DCC, please check that the \"xfer\" plugin is loaded" +msgstr "" + +#, fuzzy, c-format msgid "%s%s: not connected to server \"%s\"!" 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: 2022-07-24 22:18+0200\n" +"POT-Creation-Date: 2022-07-27 21:18+0200\n" "PO-Revision-Date: 2022-07-06 08:29+0400\n" "Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7840,6 +7840,16 @@ msgid "%s%s: unable to resolve local address of server socket: error %d %s" msgstr "" "%s%s: локална адреса сервер сокета није могла да се разреши: грешка %d %s" +#, fuzzy, c-format +#| msgid "%s%s: unable to create socket" +msgid "%s%s: unable to create DCC" +msgstr "%s%s: није могао да се креира сокет" + +#, c-format +msgid "" +"%s%s: unable to create DCC, please check that the \"xfer\" plugin is loaded" +msgstr "" + #, c-format msgid "%s%s: not connected to server \"%s\"!" 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: 2022-07-24 22:18+0200\n" +"POT-Creation-Date: 2022-07-27 21:18+0200\n" "PO-Revision-Date: 2022-06-18 16:13+0200\n" "Last-Translator: Emir SARI <emir_sari@icloud.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7854,6 +7854,16 @@ msgstr "%s%s: \"%s\" komutu, bir sunucu arabelleğinde çalıştırılamaz" msgid "%s%s: unable to resolve local address of server socket: error %d %s" msgstr "%s%s: Sunucu soketinin yerel adresi çözülemiyor: Hata %d %s" +#, fuzzy, c-format +#| msgid "%s%s: unable to create socket" +msgid "%s%s: unable to create DCC" +msgstr "%s%s: Soket oluşturulamıyor" + +#, c-format +msgid "" +"%s%s: unable to create DCC, please check that the \"xfer\" plugin is loaded" +msgstr "" + #, c-format msgid "%s%s: not connected to server \"%s\"!" msgstr "%s%s: \"%s\" sunucusuna bağlı değil!" diff --git a/po/weechat.pot b/po/weechat.pot index 457b32bd3..d2461eca4 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: 2022-07-24 22:18+0200\n" +"POT-Creation-Date: 2022-07-27 21:18+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" @@ -5549,6 +5549,15 @@ msgid "%s%s: unable to resolve local address of server socket: error %d %s" msgstr "" #, c-format +msgid "%s%s: unable to create DCC" +msgstr "" + +#, c-format +msgid "" +"%s%s: unable to create DCC, please check that the \"xfer\" plugin is loaded" +msgstr "" + +#, c-format msgid "%s%s: not connected to server \"%s\"!" msgstr "" diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 368c32f48..8b2692bcb 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -2072,13 +2072,13 @@ IRC_COMMAND_CALLBACK(dcc) weechat_infolist_new_var_string (item, "filename", argv_eol[3]); weechat_infolist_new_var_string (item, "local_address", str_address); weechat_infolist_new_var_integer (item, "socket", ptr_server->sock); - (void) weechat_hook_signal_send ("xfer_add", - WEECHAT_HOOK_SIGNAL_POINTER, - infolist); + rc = weechat_hook_signal_send ("xfer_add", + WEECHAT_HOOK_SIGNAL_POINTER, + infolist); } weechat_infolist_free (infolist); } - return WEECHAT_RC_OK; + goto end; } /* DCC CHAT */ @@ -2100,16 +2100,38 @@ IRC_COMMAND_CALLBACK(dcc) "irc.%s.%s", ptr_server->name, argv[2]); weechat_infolist_new_var_string (item, "charset_modifier", charset_modifier); weechat_infolist_new_var_string (item, "local_address", str_address); - (void) weechat_hook_signal_send ("xfer_add", - WEECHAT_HOOK_SIGNAL_POINTER, - infolist); + rc = weechat_hook_signal_send ("xfer_add", + WEECHAT_HOOK_SIGNAL_POINTER, + infolist); } weechat_infolist_free (infolist); } - return WEECHAT_RC_OK; + goto end; } WEECHAT_COMMAND_ERROR; + +end: + switch (rc) + { + case WEECHAT_RC_OK_EAT: + /* signal has been properly handled by the xfer plugin */ + break; + case WEECHAT_RC_ERROR: + weechat_printf ( + ptr_server->buffer, + _("%s%s: unable to create DCC"), + weechat_prefix ("error"), IRC_PLUGIN_NAME); + break; + default: + weechat_printf ( + ptr_server->buffer, + _("%s%s: unable to create DCC, please check that " + "the \"xfer\" plugin is loaded"), + weechat_prefix ("error"), IRC_PLUGIN_NAME); + break; + } + return WEECHAT_RC_OK; } /* diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index 4c114b81c..b1c5690d8 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -1443,7 +1443,7 @@ xfer_add_cb (const void *pointer, void *data, if (short_filename) free (short_filename); weechat_infolist_reset_item_cursor (infolist); - return WEECHAT_RC_OK; + return WEECHAT_RC_OK_EAT; error: if (filename2) |