summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.adoc1
-rw-r--r--ReleaseNotes.adoc17
-rw-r--r--doc/de/includes/autogen_user_options.de.adoc6
-rw-r--r--doc/en/includes/autogen_user_options.en.adoc6
-rw-r--r--doc/fr/includes/autogen_user_options.fr.adoc6
-rw-r--r--doc/it/includes/autogen_user_options.it.adoc6
-rw-r--r--doc/ja/includes/autogen_user_options.ja.adoc6
-rw-r--r--doc/pl/includes/autogen_user_options.pl.adoc6
-rw-r--r--po/cs.po16
-rw-r--r--po/de.po16
-rw-r--r--po/es.po16
-rw-r--r--po/fr.po26
-rw-r--r--po/hu.po16
-rw-r--r--po/it.po16
-rw-r--r--po/ja.po16
-rw-r--r--po/pl.po16
-rw-r--r--po/pt.po16
-rw-r--r--po/pt_BR.po16
-rw-r--r--po/ru.po16
-rw-r--r--po/tr.po16
-rw-r--r--po/weechat.pot16
-rw-r--r--src/plugins/script/script-action.c178
-rw-r--r--src/plugins/script/script-action.h5
-rw-r--r--src/plugins/script/script-config.c12
-rw-r--r--src/plugins/script/script-config.h1
-rw-r--r--src/plugins/script/script-repo.c15
-rw-r--r--src/plugins/script/script-repo.h2
-rw-r--r--src/plugins/script/script.c26
-rw-r--r--src/plugins/script/script.h1
29 files changed, 417 insertions, 95 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index 6d372b7ab..afb33ed26 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -26,6 +26,7 @@ New features::
* irc: add pointer to irc_nick in focus of bar item "buffer_nicklist" (issue #1535, issue #1538)
* irc: allow to send text on buffers with commands /allchan, /allpv and /allserv
* irc: evaluate command executed by commands /allchan, /allpv and /allserv (issue #1536)
+ * script: add option script.scripts.download_enabled (issue #1548)
Bug fixes::
diff --git a/ReleaseNotes.adoc b/ReleaseNotes.adoc
index 37e2e7c58..9269e2094 100644
--- a/ReleaseNotes.adoc
+++ b/ReleaseNotes.adoc
@@ -20,6 +20,23 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
[[v3.0]]
== Version 3.0 (under dev)
+[[v3.0_script_option_download_enabled]]
+=== New option to enable download of scripts
+
+A new option has been added to allow the script plugin to download the list of
+scripts and the scripts themselves (on weechat.org by default).
+
+This option is `off` by default, so you must opt in if you want to use the
+`/script` command, even if you upgraded from an old WeeChat version:
+
+----
+/set script.scripts.download_enabled on
+----
+
+[NOTE]
+When this option is enabled, WeeChat can sometimes download again the list of
+scripts when you use the `/script` command, even if you don't install a script.
+
[[v3.0_irc_commands_allchan_allpv_allserv]]
=== IRC commands /allchan, /allpv and /allserv
diff --git a/doc/de/includes/autogen_user_options.de.adoc b/doc/de/includes/autogen_user_options.de.adoc
index 81442f1cb..7d67105c9 100644
--- a/doc/de/includes/autogen_user_options.de.adoc
+++ b/doc/de/includes/autogen_user_options.de.adoc
@@ -3320,6 +3320,12 @@
** Werte: -1 .. 525600
** Standardwert: `+1440+`
+* [[option_script.scripts.download_enabled]] *script.scripts.download_enabled*
+** Beschreibung: pass:none[enable download of files from the scripts repository when the /script command is used (list of scripts and scripts themselves); the list of scripts is downloaded from the URL specified in the option script.scripts.url; WeeChat will sometimes download again the list of scripts when you use the /script command, even if you don't install a script]
+** Typ: boolesch
+** Werte: on, off
+** Standardwert: `+off+`
+
* [[option_script.scripts.download_timeout]] *script.scripts.download_timeout*
** Beschreibung: pass:none[Zeitüberschreitung (in Sekunden) beim herunterladen von Skripten und der Skriptliste]
** Typ: integer
diff --git a/doc/en/includes/autogen_user_options.en.adoc b/doc/en/includes/autogen_user_options.en.adoc
index 2503bd78e..11fee7187 100644
--- a/doc/en/includes/autogen_user_options.en.adoc
+++ b/doc/en/includes/autogen_user_options.en.adoc
@@ -3320,6 +3320,12 @@
** values: -1 .. 525600
** default value: `+1440+`
+* [[option_script.scripts.download_enabled]] *script.scripts.download_enabled*
+** description: pass:none[enable download of files from the scripts repository when the /script command is used (list of scripts and scripts themselves); the list of scripts is downloaded from the URL specified in the option script.scripts.url; WeeChat will sometimes download again the list of scripts when you use the /script command, even if you don't install a script]
+** type: boolean
+** values: on, off
+** default value: `+off+`
+
* [[option_script.scripts.download_timeout]] *script.scripts.download_timeout*
** description: pass:none[timeout (in seconds) for download of scripts and list of scripts]
** type: integer
diff --git a/doc/fr/includes/autogen_user_options.fr.adoc b/doc/fr/includes/autogen_user_options.fr.adoc
index 8bacc2b16..a68bfe6df 100644
--- a/doc/fr/includes/autogen_user_options.fr.adoc
+++ b/doc/fr/includes/autogen_user_options.fr.adoc
@@ -3320,6 +3320,12 @@
** valeurs: -1 .. 525600
** valeur par défaut: `+1440+`
+* [[option_script.scripts.download_enabled]] *script.scripts.download_enabled*
+** description: pass:none[activer le téléchargement des fichiers depuis le dépôt des scripts lorsque la commande /script est utilisée (liste des scripts et les scripts eux-mêmes) ; la liste des scripts est téléchargée depuis l'URL spécifiée dans l'option script.scripts.url ; WeeChat téléchargera parfois à nouveau la liste des scripts quand vous utilisez la commande /script, même si vous n'installez pas un script]
+** type: booléen
+** valeurs: on, off
+** valeur par défaut: `+off+`
+
* [[option_script.scripts.download_timeout]] *script.scripts.download_timeout*
** description: pass:none[délai d'attente maximum (en secondes) pour le téléchargement des scripts et de la liste des scripts]
** type: entier
diff --git a/doc/it/includes/autogen_user_options.it.adoc b/doc/it/includes/autogen_user_options.it.adoc
index ed8590e2c..7ce0c58b2 100644
--- a/doc/it/includes/autogen_user_options.it.adoc
+++ b/doc/it/includes/autogen_user_options.it.adoc
@@ -3320,6 +3320,12 @@
** valori: -1 .. 525600
** valore predefinito: `+1440+`
+* [[option_script.scripts.download_enabled]] *script.scripts.download_enabled*
+** descrizione: pass:none[enable download of files from the scripts repository when the /script command is used (list of scripts and scripts themselves); the list of scripts is downloaded from the URL specified in the option script.scripts.url; WeeChat will sometimes download again the list of scripts when you use the /script command, even if you don't install a script]
+** tipo: bool
+** valori: on, off
+** valore predefinito: `+off+`
+
* [[option_script.scripts.download_timeout]] *script.scripts.download_timeout*
** descrizione: pass:none[timeout (in seconds) for download of scripts and list of scripts]
** tipo: intero
diff --git a/doc/ja/includes/autogen_user_options.ja.adoc b/doc/ja/includes/autogen_user_options.ja.adoc
index 3edab6046..f6ff3270b 100644
--- a/doc/ja/includes/autogen_user_options.ja.adoc
+++ b/doc/ja/includes/autogen_user_options.ja.adoc
@@ -3320,6 +3320,12 @@
** 値: -1 .. 525600
** デフォルト値: `+1440+`
+* [[option_script.scripts.download_enabled]] *script.scripts.download_enabled*
+** 説明: pass:none[enable download of files from the scripts repository when the /script command is used (list of scripts and scripts themselves); the list of scripts is downloaded from the URL specified in the option script.scripts.url; WeeChat will sometimes download again the list of scripts when you use the /script command, even if you don't install a script]
+** タイプ: ブール
+** 値: on, off
+** デフォルト値: `+off+`
+
* [[option_script.scripts.download_timeout]] *script.scripts.download_timeout*
** 説明: pass:none[スクリプトのダウンロードとスクリプトのリストに対するタイムアウト時間 (秒単位)]
** タイプ: 整数
diff --git a/doc/pl/includes/autogen_user_options.pl.adoc b/doc/pl/includes/autogen_user_options.pl.adoc
index 1a5db9cb6..5f4b8c429 100644
--- a/doc/pl/includes/autogen_user_options.pl.adoc
+++ b/doc/pl/includes/autogen_user_options.pl.adoc
@@ -3320,6 +3320,12 @@
** wartości: -1 .. 525600
** domyślna wartość: `+1440+`
+* [[option_script.scripts.download_enabled]] *script.scripts.download_enabled*
+** opis: pass:none[enable download of files from the scripts repository when the /script command is used (list of scripts and scripts themselves); the list of scripts is downloaded from the URL specified in the option script.scripts.url; WeeChat will sometimes download again the list of scripts when you use the /script command, even if you don't install a script]
+** typ: bool
+** wartości: on, off
+** domyślna wartość: `+off+`
+
* [[option_script.scripts.download_timeout]] *script.scripts.download_timeout*
** opis: pass:none[czas oczekiwania (w sekundach) na pobranie skryptu i listy skryptów]
** typ: liczba
diff --git a/po/cs.po b/po/cs.po
index 67129e551..bf5ab360c 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-08-09 10:51+0200\n"
+"POT-Creation-Date: 2020-09-06 12:40+0200\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -11600,6 +11600,12 @@ msgstr "Skripty"
msgid "Script manager"
msgstr "Správce skriptů"
+#, c-format
+msgid ""
+"%s%s: download of scripts is disabled by default; see /help script.scripts."
+"download_enabled"
+msgstr ""
+
#, fuzzy
msgid "WeeChat script manager"
msgstr "správce skriptů WeeChatu"
@@ -11935,6 +11941,14 @@ msgid ""
"expire)"
msgstr ""
+msgid ""
+"enable download of files from the scripts repository when the /script "
+"command is used (list of scripts and scripts themselves); the list of "
+"scripts is downloaded from the URL specified in the option script.scripts."
+"url; WeeChat will sometimes download again the list of scripts when you use "
+"the /script command, even if you don't install a script"
+msgstr ""
+
#, fuzzy
msgid "timeout (in seconds) for download of scripts and list of scripts"
msgstr "časový limit (v sekundách) pro gnutls handshake"
diff --git a/po/de.po b/po/de.po
index 9ed2b9dae..2848b32c4 100644
--- a/po/de.po
+++ b/po/de.po
@@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-08-09 10:51+0200\n"
+"POT-Creation-Date: 2020-09-06 12:40+0200\n"
"PO-Revision-Date: 2020-08-11 18:40+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -13653,6 +13653,12 @@ msgstr "Skripten"
msgid "Script manager"
msgstr "Skriptmanager"
+#, c-format
+msgid ""
+"%s%s: download of scripts is disabled by default; see /help script.scripts."
+"download_enabled"
+msgstr ""
+
msgid "WeeChat script manager"
msgstr "WeeChat Skriptmanager"
@@ -14028,6 +14034,14 @@ msgstr ""
"Ablaufdatum des lokalen Caches, in Minuten (-1 = ohne Ablaufdatum, 0 = "
"umgehend)"
+msgid ""
+"enable download of files from the scripts repository when the /script "
+"command is used (list of scripts and scripts themselves); the list of "
+"scripts is downloaded from the URL specified in the option script.scripts."
+"url; WeeChat will sometimes download again the list of scripts when you use "
+"the /script command, even if you don't install a script"
+msgstr ""
+
msgid "timeout (in seconds) for download of scripts and list of scripts"
msgstr ""
"Zeitüberschreitung (in Sekunden) beim herunterladen von Skripten und der "
diff --git a/po/es.po b/po/es.po
index 591c9bb93..963918dc3 100644
--- a/po/es.po
+++ b/po/es.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-08-09 10:51+0200\n"
+"POT-Creation-Date: 2020-09-06 12:40+0200\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -11942,6 +11942,12 @@ msgstr ""
msgid "Script manager"
msgstr "Administración de scripts"
+#, c-format
+msgid ""
+"%s%s: download of scripts is disabled by default; see /help script.scripts."
+"download_enabled"
+msgstr ""
+
#, fuzzy
msgid "WeeChat script manager"
msgstr "Administrador de scripts de WeeChat"
@@ -12193,6 +12199,14 @@ msgid ""
"expire)"
msgstr ""
+msgid ""
+"enable download of files from the scripts repository when the /script "
+"command is used (list of scripts and scripts themselves); the list of "
+"scripts is downloaded from the URL specified in the option script.scripts."
+"url; WeeChat will sometimes download again the list of scripts when you use "
+"the /script command, even if you don't install a script"
+msgstr ""
+
#, fuzzy
msgid "timeout (in seconds) for download of scripts and list of scripts"
msgstr ""
diff --git a/po/fr.po b/po/fr.po
index e0025ec45..e5aebcba0 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-08-09 10:51+0200\n"
-"PO-Revision-Date: 2020-08-09 10:53+0200\n"
+"POT-Creation-Date: 2020-09-06 12:40+0200\n"
+"PO-Revision-Date: 2020-09-06 12:44+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -13370,6 +13370,14 @@ msgstr "Scripts"
msgid "Script manager"
msgstr "Gestionnaire de scripts"
+#, c-format
+msgid ""
+"%s%s: download of scripts is disabled by default; see /help script.scripts."
+"download_enabled"
+msgstr ""
+"%s%s : le téléchargement des scripts est désactivé par défaut ; voir /help "
+"script.scripts.download_enabled"
+
msgid "WeeChat script manager"
msgstr "Gestionnaire de scripts WeeChat"
@@ -13731,6 +13739,20 @@ msgstr ""
"temps d'expiration du cache local, en minutes (-1 = n'expire jamais, 0 = "
"expire toujours)"
+msgid ""
+"enable download of files from the scripts repository when the /script "
+"command is used (list of scripts and scripts themselves); the list of "
+"scripts is downloaded from the URL specified in the option script.scripts."
+"url; WeeChat will sometimes download again the list of scripts when you use "
+"the /script command, even if you don't install a script"
+msgstr ""
+"activer le téléchargement des fichiers depuis le dépôt des scripts lorsque "
+"la commande /script est utilisée (liste des scripts et les scripts eux-"
+"mêmes) ; la liste des scripts est téléchargée depuis l'URL spécifiée dans "
+"l'option script.scripts.url ; WeeChat téléchargera parfois à nouveau la "
+"liste des scripts quand vous utilisez la commande /script, même si vous "
+"n'installez pas un script"
+
msgid "timeout (in seconds) for download of scripts and list of scripts"
msgstr ""
"délai d'attente maximum (en secondes) pour le téléchargement des scripts et "
diff --git a/po/hu.po b/po/hu.po
index daf476c6d..61f9b8349 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-08-09 10:51+0200\n"
+"POT-Creation-Date: 2020-09-06 12:40+0200\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10937,6 +10937,12 @@ msgstr ""
msgid "Script manager"
msgstr "WeeChat szlogen"
+#, c-format
+msgid ""
+"%s%s: download of scripts is disabled by default; see /help script.scripts."
+"download_enabled"
+msgstr ""
+
#, fuzzy
msgid "WeeChat script manager"
msgstr "WeeChat szlogen"
@@ -11200,6 +11206,14 @@ msgid ""
"expire)"
msgstr ""
+msgid ""
+"enable download of files from the scripts repository when the /script "
+"command is used (list of scripts and scripts themselves); the list of "
+"scripts is downloaded from the URL specified in the option script.scripts."
+"url; WeeChat will sometimes download again the list of scripts when you use "
+"the /script command, even if you don't install a script"
+msgstr ""
+
#, fuzzy
msgid "timeout (in seconds) for download of scripts and list of scripts"
msgstr "SSL használata a a kapcsolathoz"
diff --git a/po/it.po b/po/it.po
index 5593aac22..810531a6e 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-08-09 10:51+0200\n"
+"POT-Creation-Date: 2020-09-06 12:40+0200\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -12155,6 +12155,12 @@ msgstr "Script"
msgid "Script manager"
msgstr "Gestore script"
+#, c-format
+msgid ""
+"%s%s: download of scripts is disabled by default; see /help script.scripts."
+"download_enabled"
+msgstr ""
+
#, fuzzy
msgid "WeeChat script manager"
msgstr "Gestore script di WeeChat"
@@ -12413,6 +12419,14 @@ msgid ""
"expire)"
msgstr ""
+msgid ""
+"enable download of files from the scripts repository when the /script "
+"command is used (list of scripts and scripts themselves); the list of "
+"scripts is downloaded from the URL specified in the option script.scripts."
+"url; WeeChat will sometimes download again the list of scripts when you use "
+"the /script command, even if you don't install a script"
+msgstr ""
+
#, fuzzy
msgid "timeout (in seconds) for download of scripts and list of scripts"
msgstr ""
diff --git a/po/ja.po b/po/ja.po
index 4804f1f40..b984baad9 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-08-09 10:51+0200\n"
+"POT-Creation-Date: 2020-09-06 12:40+0200\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -12811,6 +12811,12 @@ msgstr "スクリプト"
msgid "Script manager"
msgstr "スクリプトマネージャ"
+#, c-format
+msgid ""
+"%s%s: download of scripts is disabled by default; see /help script.scripts."
+"download_enabled"
+msgstr ""
+
msgid "WeeChat script manager"
msgstr "WeeChat スクリプトマネージャ"
@@ -13148,6 +13154,14 @@ msgstr ""
"ローカルキャッシュが無効になる時間、分単位 (-1 = 再取得しない、0 = 常に再取"
"得)"
+msgid ""
+"enable download of files from the scripts repository when the /script "
+"command is used (list of scripts and scripts themselves); the list of "
+"scripts is downloaded from the URL specified in the option script.scripts."
+"url; WeeChat will sometimes download again the list of scripts when you use "
+"the /script command, even if you don't install a script"
+msgstr ""
+
msgid "timeout (in seconds) for download of scripts and list of scripts"
msgstr ""
"スクリプトのダウンロードとスクリプトのリストに対するタイムアウト時間 (秒単位)"
diff --git a/po/pl.po b/po/pl.po
index 472473e2a..fa4c26550 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-08-09 10:51+0200\n"
+"POT-Creation-Date: 2020-09-06 12:40+0200\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -13046,6 +13046,12 @@ msgstr "Skrypty"
msgid "Script manager"
msgstr "Manager skryptów"
+#, c-format
+msgid ""
+"%s%s: download of scripts is disabled by default; see /help script.scripts."
+"download_enabled"
+msgstr ""
+
msgid "WeeChat script manager"
msgstr "Manager skryptów WeeChat"
@@ -13392,6 +13398,14 @@ msgstr ""
"lokalnie zapisany czas wygaśnięcia, w minutach (-1 = nigdy nie wygasa, 0 = "
"zawsze wygasa)"
+msgid ""
+"enable download of files from the scripts repository when the /script "
+"command is used (list of scripts and scripts themselves); the list of "
+"scripts is downloaded from the URL specified in the option script.scripts."
+"url; WeeChat will sometimes download again the list of scripts when you use "
+"the /script command, even if you don't install a script"
+msgstr ""
+
msgid "timeout (in seconds) for download of scripts and list of scripts"
msgstr "czas oczekiwania (w sekundach) na pobranie skryptu i listy skryptów"
diff --git a/po/pt.po b/po/pt.po
index 706bd053f..ceb048202 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-08-09 10:51+0200\n"
+"POT-Creation-Date: 2020-09-06 12:40+0200\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -12621,6 +12621,12 @@ msgstr "Scripts"
msgid "Script manager"
msgstr "Gestor de scripts"
+#, c-format
+msgid ""
+"%s%s: download of scripts is disabled by default; see /help script.scripts."
+"download_enabled"
+msgstr ""
+
#, fuzzy
msgid "WeeChat script manager"
msgstr "Gestor de scripts do WeeChat"
@@ -12966,6 +12972,14 @@ msgstr ""
"data de expiração da cache local, em minutos (-1 = nunca expirar, 0 = "
"expirar sempre)"
+msgid ""
+"enable download of files from the scripts repository when the /script "
+"command is used (list of scripts and scripts themselves); the list of "
+"scripts is downloaded from the URL specified in the option script.scripts."
+"url; WeeChat will sometimes download again the list of scripts when you use "
+"the /script command, even if you don't install a script"
+msgstr ""
+
msgid "timeout (in seconds) for download of scripts and list of scripts"
msgstr "tempo limite (em segundo) para transferir scripts e a lista de scripts"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 42ddacea8..038f5977e 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: 2020-08-09 10:51+0200\n"
+"POT-Creation-Date: 2020-09-06 12:40+0200\n"
"PO-Revision-Date: 2020-04-18 11:34+0200\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -11400,6 +11400,12 @@ msgstr ""
msgid "Script manager"
msgstr "site do WeeChat"
+#, c-format
+msgid ""
+"%s%s: download of scripts is disabled by default; see /help script.scripts."
+"download_enabled"
+msgstr ""
+
#, fuzzy
msgid "WeeChat script manager"
msgstr "site do WeeChat"
@@ -11663,6 +11669,14 @@ msgid ""
"expire)"
msgstr ""
+msgid ""
+"enable download of files from the scripts repository when the /script "
+"command is used (list of scripts and scripts themselves); the list of "
+"scripts is downloaded from the URL specified in the option script.scripts."
+"url; WeeChat will sometimes download again the list of scripts when you use "
+"the /script command, even if you don't install a script"
+msgstr ""
+
# better not translate handshake
#, fuzzy
msgid "timeout (in seconds) for download of scripts and list of scripts"
diff --git a/po/ru.po b/po/ru.po
index dda0f8480..d9375549f 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-08-09 10:51+0200\n"
+"POT-Creation-Date: 2020-09-06 12:40+0200\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10973,6 +10973,12 @@ msgstr ""
msgid "Script manager"
msgstr "слоган WeeChat"
+#, c-format
+msgid ""
+"%s%s: download of scripts is disabled by default; see /help script.scripts."
+"download_enabled"
+msgstr ""
+
#, fuzzy
msgid "WeeChat script manager"
msgstr "слоган WeeChat"
@@ -11236,6 +11242,14 @@ msgid ""
"expire)"
msgstr ""
+msgid ""
+"enable download of files from the scripts repository when the /script "
+"command is used (list of scripts and scripts themselves); the list of "
+"scripts is downloaded from the URL specified in the option script.scripts."
+"url; WeeChat will sometimes download again the list of scripts when you use "
+"the /script command, even if you don't install a script"
+msgstr ""
+
#, fuzzy
msgid "timeout (in seconds) for download of scripts and list of scripts"
msgstr "использовать SSL при связи с сервером"
diff --git a/po/tr.po b/po/tr.po
index ca95c4127..a417c3810 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-08-09 10:51+0200\n"
+"POT-Creation-Date: 2020-09-06 12:40+0200\n"
"PO-Revision-Date: 2019-11-03 08:38+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9993,6 +9993,12 @@ msgstr "Betikler"
msgid "Script manager"
msgstr "Betik yöneticisi"
+#, c-format
+msgid ""
+"%s%s: download of scripts is disabled by default; see /help script.scripts."
+"download_enabled"
+msgstr ""
+
#, fuzzy
msgid "WeeChat script manager"
msgstr "WeeChat betik yöneticisi"
@@ -10238,6 +10244,14 @@ msgid ""
"expire)"
msgstr ""
+msgid ""
+"enable download of files from the scripts repository when the /script "
+"command is used (list of scripts and scripts themselves); the list of "
+"scripts is downloaded from the URL specified in the option script.scripts."
+"url; WeeChat will sometimes download again the list of scripts when you use "
+"the /script command, even if you don't install a script"
+msgstr ""
+
msgid "timeout (in seconds) for download of scripts and list of scripts"
msgstr ""
diff --git a/po/weechat.pot b/po/weechat.pot
index 9cefdfdee..586d19b0a 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: 2020-08-09 10:51+0200\n"
+"POT-Creation-Date: 2020-09-06 12:40+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"
@@ -9852,6 +9852,12 @@ msgstr ""
msgid "Script manager"
msgstr ""
+#, c-format
+msgid ""
+"%s%s: download of scripts is disabled by default; see /help script.scripts."
+"download_enabled"
+msgstr ""
+
msgid "WeeChat script manager"
msgstr ""
@@ -10089,6 +10095,14 @@ msgid ""
"expire)"
msgstr ""
+msgid ""
+"enable download of files from the scripts repository when the /script "
+"command is used (list of scripts and scripts themselves); the list of "
+"scripts is downloaded from the URL specified in the option script.scripts."
+"url; WeeChat will sometimes download again the list of scripts when you use "
+"the /script command, even if you don't install a script"
+msgstr ""
+
msgid "timeout (in seconds) for download of scripts and list of scripts"
msgstr ""
diff --git a/src/plugins/script/script-action.c b/src/plugins/script/script-action.c
index faedbfb84..47794a1b7 100644
--- a/src/plugins/script/script-action.c
+++ b/src/plugins/script/script-action.c
@@ -35,10 +35,10 @@
#include "script-repo.h"
-char *script_actions = NULL;
+char **script_actions = NULL;
-void script_action_install (int quiet);
+void script_action_run_install (int quiet);
/*
@@ -46,7 +46,7 @@ void script_action_install (int quiet);
*/
void
-script_action_list ()
+script_action_run_list ()
{
int i, scripts_loaded;
char hdata_name[128];
@@ -100,7 +100,7 @@ script_action_list ()
*/
void
-script_action_list_input (int send_to_buffer, int translated)
+script_action_run_list_input (int send_to_buffer, int translated)
{
int i, length;
char hdata_name[128], **buf, str_pos[16];
@@ -176,7 +176,7 @@ script_action_list_input (int send_to_buffer, int translated)
*/
void
-script_action_load (const char *name, int quiet)
+script_action_run_load (const char *name, int quiet)
{
char *pos, str_command[1024];
int language;
@@ -219,7 +219,7 @@ script_action_load (const char *name, int quiet)
*/
void
-script_action_unload (const char *name, int quiet)
+script_action_run_unload (const char *name, int quiet)
{
char *pos, hdata_name[128], *filename, *ptr_base_name, str_command[1024];
const char *ptr_filename, *ptr_registered_name;
@@ -324,7 +324,7 @@ script_action_unload (const char *name, int quiet)
*/
void
-script_action_reload (const char *name, int quiet)
+script_action_run_reload (const char *name, int quiet)
{
char *pos, hdata_name[128], *filename, *ptr_base_name, str_command[1024];
const char *ptr_filename, *ptr_registered_name;
@@ -434,7 +434,7 @@ script_action_reload (const char *name, int quiet)
*/
void
-script_action_autoload (const char *name, int quiet, int autoload)
+script_action_run_autoload (const char *name, int quiet, int autoload)
{
struct t_script_repo *ptr_script;
char str_signal[256], *filename;
@@ -509,7 +509,7 @@ script_action_installnext_timer_cb (const void *pointer, void *data,
(void) data;
(void) remaining_calls;
- script_action_install ((pointer) ? 1 : 0);
+ script_action_run_install ((pointer) ? 1 : 0);
return WEECHAT_RC_OK;
}
@@ -630,12 +630,15 @@ script_action_get_next_script_to_install ()
*/
void
-script_action_install (int quiet)
+script_action_run_install (int quiet)
{
struct t_script_repo *ptr_script_to_install;
char *filename, *url;
struct t_hashtable *options;
+ if (!script_download_enabled ())
+ return;
+
while (1)
{
ptr_script_to_install = script_action_get_next_script_to_install ();
@@ -701,7 +704,7 @@ script_action_install (int quiet)
*/
void
-script_action_remove (const char *name, int quiet)
+script_action_run_remove (const char *name, int quiet)
{
struct t_script_repo *ptr_script;
char str_signal[256], *filename;
@@ -783,7 +786,7 @@ script_action_remove (const char *name, int quiet)
*/
int
-script_action_hold (const char *name, int quiet)
+script_action_run_hold (const char *name, int quiet)
{
struct t_script_repo *ptr_script;
@@ -1071,12 +1074,15 @@ script_action_show_source_process_cb (const void *pointer, void *data,
*/
void
-script_action_show (const char *name, int quiet)
+script_action_run_show (const char *name, int quiet)
{
struct t_script_repo *ptr_script;
char *filename, *url;
struct t_hashtable *options;
+ if (!script_download_enabled ())
+ return;
+
if (name)
{
ptr_script = script_repo_search_by_name_ext (name);
@@ -1148,7 +1154,7 @@ script_action_show (const char *name, int quiet)
*/
void
-script_action_showdiff ()
+script_action_run_showdiff ()
{
char str_command[64];
struct t_gui_window *window;
@@ -1181,6 +1187,40 @@ script_action_showdiff ()
}
/*
+ * Adds an action to list of actions.
+ */
+
+void
+script_action_add (const char *action)
+{
+ if (!action)
+ return;
+
+ if (!script_actions)
+ {
+ script_actions = weechat_string_dyn_alloc (256);
+ if (!script_actions)
+ return;
+ }
+
+ if (*script_actions[0])
+ weechat_string_dyn_concat (script_actions, "\n", -1);
+
+ weechat_string_dyn_concat (script_actions, action, -1);
+}
+
+/*
+ * Clears list of actions.
+ */
+
+void
+script_action_clear ()
+{
+ if (script_actions)
+ weechat_string_dyn_copy (script_actions, NULL);
+}
+
+/*
* Runs planned actions.
*
* Returns:
@@ -1189,18 +1229,18 @@ script_action_showdiff ()
*/
int
-script_action_run ()
+script_action_run_all ()
{
char **actions, **argv, **argv_eol, *ptr_action;
int num_actions, argc, i, j, quiet, script_found;
struct t_script_repo *ptr_script;
- if (!script_actions)
+ if (!script_actions || !script_actions[0])
return 0;
script_get_loaded_plugins ();
- actions = weechat_string_split (script_actions, "\n", NULL,
+ actions = weechat_string_split (*script_actions, "\n", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -1269,59 +1309,59 @@ script_action_run ()
if (argc > 1)
{
if (weechat_strcasecmp (argv[1], "-i") == 0)
- script_action_list_input (0, 0);
+ script_action_run_list_input (0, 0);
else if (weechat_strcasecmp (argv[1], "-il") == 0)
- script_action_list_input (0, 1);
+ script_action_run_list_input (0, 1);
else if (weechat_strcasecmp (argv[1], "-o") == 0)
- script_action_list_input (1, 0);
+ script_action_run_list_input (1, 0);
else if (weechat_strcasecmp (argv[1], "-ol") == 0)
- script_action_list_input (1, 1);
+ script_action_run_list_input (1, 1);
else
- script_action_list ();
+ script_action_run_list ();
}
else
- script_action_list ();
+ script_action_run_list ();
}
else if (weechat_strcasecmp (argv[0], "load") == 0)
{
for (j = 1; j < argc; j++)
{
- script_action_load (argv[j], quiet);
+ script_action_run_load (argv[j], quiet);
}
}
else if (weechat_strcasecmp (argv[0], "unload") == 0)
{
for (j = 1; j < argc; j++)
{
- script_action_unload (argv[j], quiet);
+ script_action_run_unload (argv[j], quiet);
}
}
else if (weechat_strcasecmp (argv[0], "reload") == 0)
{
for (j = 1; j < argc; j++)
{
- script_action_reload (argv[j], quiet);
+ script_action_run_reload (argv[j], quiet);
}
}
else if (weechat_strcasecmp (argv[0], "autoload") == 0)
{
for (j = 1; j < argc; j++)
{
- script_action_autoload (argv[j], quiet, 1);
+ script_action_run_autoload (argv[j], quiet, 1);
}
}
else if (weechat_strcasecmp (argv[0], "noautoload") == 0)
{
for (j = 1; j < argc; j++)
{
- script_action_autoload (argv[j], quiet, 0);
+ script_action_run_autoload (argv[j], quiet, 0);
}
}
else if (weechat_strcasecmp (argv[0], "toggleautoload") == 0)
{
for (j = 1; j < argc; j++)
{
- script_action_autoload (argv[j], quiet, -1);
+ script_action_run_autoload (argv[j], quiet, -1);
}
}
else if (weechat_strcasecmp (argv[0], "install") == 0)
@@ -1360,13 +1400,13 @@ script_action_run ()
}
}
if (script_found)
- script_action_install (quiet);
+ script_action_run_install (quiet);
}
else if (weechat_strcasecmp (argv[0], "remove") == 0)
{
for (j = 1; j < argc; j++)
{
- script_action_remove (argv[j], quiet);
+ script_action_run_remove (argv[j], quiet);
}
}
else if (weechat_strcasecmp (argv[0], "installremove") == 0)
@@ -1385,7 +1425,7 @@ script_action_run ()
}
else if (ptr_script->status & SCRIPT_STATUS_INSTALLED)
{
- script_action_remove (argv[j], quiet);
+ script_action_run_remove (argv[j], quiet);
}
else
{
@@ -1401,14 +1441,14 @@ script_action_run ()
}
}
if (script_found)
- script_action_install (quiet);
+ script_action_run_install (quiet);
}
else if (weechat_strcasecmp (argv[0], "hold") == 0)
{
script_found = 0;
for (j = 1; j < argc; j++)
{
- if (script_action_hold (argv[j], quiet))
+ if (script_action_run_hold (argv[j], quiet))
script_found = 1;
}
if (script_found)
@@ -1418,13 +1458,13 @@ script_action_run ()
{
if (!script_buffer)
script_buffer_open ();
- script_action_show ((argc >= 2) ? argv[1] : NULL,
- quiet);
+ script_action_run_show ((argc >= 2) ? argv[1] : NULL,
+ quiet);
weechat_buffer_set (script_buffer, "display", "1");
}
else if (weechat_strcasecmp (argv[0], "showdiff") == 0)
{
- script_action_showdiff ();
+ script_action_run_showdiff ();
}
else if (weechat_strcasecmp (argv[0], "upgrade") == 0)
{
@@ -1445,7 +1485,7 @@ script_action_run ()
}
}
if (script_found)
- script_action_install (quiet);
+ script_action_run_install (quiet);
else
{
weechat_printf (NULL,
@@ -1462,41 +1502,11 @@ script_action_run ()
weechat_string_free_split (actions);
}
- free (script_actions);
- script_actions = NULL;
+ script_action_clear ();
return 1;
}
-
-/*
- * Adds an action to list of actions.
- */
-
-void
-script_action_add (const char *action)
-{
- char *new_actions;
-
- if (!action)
- return;
-
- if (script_actions)
- {
- new_actions = realloc (script_actions,
- strlen (script_actions) + 1 + strlen (action) + 1);
- if (!new_actions)
- return;
- script_actions = new_actions;
- strcat (script_actions, "\n");
- strcat (script_actions, action);
- }
- else
- {
- script_actions = strdup (action);
- }
-}
-
/*
* Schedules an action.
*
@@ -1507,10 +1517,11 @@ script_action_add (const char *action)
void
script_action_schedule (const char *action, int need_repository, int quiet)
{
- script_action_add (action);
-
/* create again "script" directory, just in case it has been removed */
- weechat_mkdir_home (SCRIPT_PLUGIN_NAME, 0755);
+ if (!weechat_mkdir_home (SCRIPT_PLUGIN_NAME, 0755))
+ return;
+
+ script_action_add (action);
if (need_repository)
{
@@ -1518,11 +1529,28 @@ script_action_schedule (const char *action, int need_repository, int quiet)
{
if (!scripts_repo)
script_repo_file_read (quiet);
- script_action_run ();
+ script_action_run_all ();
}
else
- script_repo_file_update (quiet);
+ {
+ if (!script_repo_file_update (quiet))
+ script_action_clear ();
+ }
}
else
- script_action_run ();
+ script_action_run_all ();
+}
+
+/*
+ * Ends script action.
+ */
+
+void
+script_action_end ()
+{
+ if (script_actions)
+ {
+ weechat_string_dyn_free (script_actions, 1);
+ script_actions = NULL;
+ }
}
diff --git a/src/plugins/script/script-action.h b/src/plugins/script/script-action.h
index 2b48aac82..05738e449 100644
--- a/src/plugins/script/script-action.h
+++ b/src/plugins/script/script-action.h
@@ -20,10 +20,11 @@
#ifndef WEECHAT_PLUGIN_SCRIPT_ACTION_H
#define WEECHAT_PLUGIN_SCRIPT_ACTION_H
-extern char *script_actions;
+extern char **script_actions;
-extern int script_action_run ();
+extern int script_action_run_all ();
extern void script_action_schedule (const char *action, int need_repository,
int quiet);
+extern void script_action_end ();
#endif /* WEECHAT_PLUGIN_SCRIPT_ACTION_H */
diff --git a/src/plugins/script/script-config.c b/src/plugins/script/script-config.c
index c8ae790af..ea5f0276c 100644
--- a/src/plugins/script/script-config.c
+++ b/src/plugins/script/script-config.c
@@ -79,6 +79,7 @@ struct t_config_option *script_config_color_text_version_selected;
struct t_config_option *script_config_scripts_autoload;
struct t_config_option *script_config_scripts_cache_expire;
+struct t_config_option *script_config_scripts_download_enabled;
struct t_config_option *script_config_scripts_download_timeout;
struct t_config_option *script_config_scripts_hold;
struct t_config_option *script_config_scripts_path;
@@ -753,6 +754,17 @@ script_config_init ()
"0 = always expire)"),
NULL, -1, 525600, "1440", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ script_config_scripts_download_enabled = weechat_config_new_option (
+ script_config_file, ptr_section,
+ "download_enabled", "boolean",
+ N_("enable download of files from the scripts repository when the "
+ "/script command is used (list of scripts and scripts themselves); "
+ "the list of scripts is downloaded from the URL specified in the "
+ "option script.scripts.url; WeeChat will sometimes download again "
+ "the list of scripts when you use the /script command, even if "
+ "you don't install a script"),
+ NULL, 0, 0, "off", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
script_config_scripts_download_timeout = weechat_config_new_option (
script_config_file, ptr_section,
"download_timeout", "integer",
diff --git a/src/plugins/script/script-config.h b/src/plugins/script/script-config.h
index 230d2a043..6c6281ecb 100644
--- a/src/plugins/script/script-config.h
+++ b/src/plugins/script/script-config.h
@@ -62,6 +62,7 @@ extern struct t_config_option *script_config_color_text_version_selected;
extern struct t_config_option *script_config_scripts_autoload;
extern struct t_config_option *script_config_scripts_cache_expire;
+extern struct t_config_option *script_config_scripts_download_enabled;
extern struct t_config_option *script_config_scripts_download_timeout;
extern struct t_config_option *script_config_scripts_hold;
extern struct t_config_option *script_config_scripts_path;
diff --git a/src/plugins/script/script-repo.c b/src/plugins/script/script-repo.c
index fb0407263..a218bc9d9 100644
--- a/src/plugins/script/script-repo.c
+++ b/src/plugins/script/script-repo.c
@@ -1478,7 +1478,7 @@ script_repo_file_update_process_cb (const void *pointer, void *data,
{
if (script_buffer)
script_buffer_refresh (1);
- if (!script_action_run ())
+ if (!script_action_run_all ())
script_buffer_refresh (1);
}
else
@@ -1490,19 +1490,26 @@ script_repo_file_update_process_cb (const void *pointer, void *data,
/*
* Updates repository file and reads it.
+ *
+ * Returns:
+ * 0: error
+ * 1: OK
*/
-void
+int
script_repo_file_update (int quiet)
{
char *filename, *url;
struct t_hashtable *options;
+ if (!script_download_enabled ())
+ return 0;
+
script_repo_remove_all ();
filename = script_config_get_xml_filename ();
if (!filename)
- return;
+ return 0;
options = weechat_hashtable_new (32,
WEECHAT_HASHTABLE_STRING,
@@ -1534,6 +1541,8 @@ script_repo_file_update (int quiet)
}
free (filename);
+
+ return 1;
}
/*
diff --git a/src/plugins/script/script-repo.h b/src/plugins/script/script-repo.h
index 4408ff5b4..5630be93b 100644
--- a/src/plugins/script/script-repo.h
+++ b/src/plugins/script/script-repo.h
@@ -80,7 +80,7 @@ extern void script_repo_filter_scripts (const char *search);
extern int script_repo_file_exists ();
extern int script_repo_file_is_uptodate ();
extern int script_repo_file_read (int quiet);
-extern void script_repo_file_update (int quiet);
+extern int script_repo_file_update (int quiet);
extern struct t_hdata *script_repo_hdata_script_cb (const void *pointer,
void *data,
const char *hdata_name);
diff --git a/src/plugins/script/script.c b/src/plugins/script/script.c
index eab823421..9d67ea5f7 100644
--- a/src/plugins/script/script.c
+++ b/src/plugins/script/script.c
@@ -27,6 +27,7 @@
#include "../weechat-plugin.h"
#include "script.h"
+#include "script-action.h"
#include "script-buffer.h"
#include "script-command.h"
#include "script-completion.h"
@@ -98,6 +99,29 @@ script_language_search_by_extension (const char *extension)
}
/*
+ * Checks if download of scripts is enabled.
+ *
+ * Returns:
+ * 0: download NOT enabled (an error is displayed)
+ * 1: download enabled
+ */
+
+int
+script_download_enabled ()
+{
+ if (weechat_config_boolean (script_config_scripts_download_enabled))
+ return 1;
+
+ /* download not enabled: display an error */
+ weechat_printf (NULL,
+ _("%s%s: download of scripts is disabled by default; "
+ "see /help script.scripts.download_enabled"),
+ weechat_prefix ("error"),
+ SCRIPT_PLUGIN_NAME);
+ return 0;
+}
+
+/*
* Builds download URL (to use with hook_process or hook_process_hashtable).
*
* Note: result must be freed after use.
@@ -394,5 +418,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
script_config_free ();
+ script_action_end ();
+
return WEECHAT_RC_OK;
}
diff --git a/src/plugins/script/script.h b/src/plugins/script/script.h
index 802af0465..11106e350 100644
--- a/src/plugins/script/script.h
+++ b/src/plugins/script/script.h
@@ -34,6 +34,7 @@ extern struct t_hashtable *script_loaded;
extern int script_language_search (const char *language);
extern int script_language_search_by_extension (const char *extension);
+extern int script_download_enabled ();
extern char *script_build_download_url (const char *url);
extern void script_get_loaded_plugins ();
extern void script_get_scripts ();