summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.adoc1
-rw-r--r--doc/de/autogen/plugin_api/infos.adoc32
-rw-r--r--doc/en/autogen/plugin_api/infos.adoc32
-rw-r--r--doc/fr/autogen/plugin_api/infos.adoc32
-rw-r--r--doc/it/autogen/plugin_api/infos.adoc32
-rw-r--r--doc/ja/autogen/plugin_api/infos.adoc32
-rw-r--r--doc/pl/autogen/plugin_api/infos.adoc32
-rw-r--r--po/cs.po9
-rw-r--r--po/de.po9
-rw-r--r--po/es.po9
-rw-r--r--po/fr.po10
-rw-r--r--po/hu.po9
-rw-r--r--po/it.po9
-rw-r--r--po/ja.po9
-rw-r--r--po/pl.po9
-rw-r--r--po/pt.po9
-rw-r--r--po/pt_BR.po9
-rw-r--r--po/ru.po9
-rw-r--r--po/tr.po8
-rw-r--r--po/weechat.pot8
-rw-r--r--src/plugins/plugin-script.c135
21 files changed, 380 insertions, 64 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index 3ee8908ed..d79c7eed5 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -22,6 +22,7 @@ New features::
* core: add option weechat.completion.partial_completion_templates to force partial completion on specific templates
* api: add hashtable with variables in plugin structure
+ * scripts: add infos "xxx_interpreter" and "xxx_version" in script plugins (issue #1075)
* scripts: add option "version" in script commands (issue #1075)
[[v2.0.1]]
diff --git a/doc/de/autogen/plugin_api/infos.adoc b/doc/de/autogen/plugin_api/infos.adoc
index 37484ae29..9fcf9a068 100644
--- a/doc/de/autogen/plugin_api/infos.adoc
+++ b/doc/de/autogen/plugin_api/infos.adoc
@@ -10,6 +10,10 @@
| fifo | fifo_filename | Name der FIFO-Pipe | -
+| guile | guile_interpreter | name of the interpreter used | -
+
+| guile | guile_version | version of the interpreter used | -
+
| irc | irc_buffer | holt Buffer Pointer für einen IRC Server/Channel/Nick | server,channel,nick (Channel und Nicks sind optional)
| irc | irc_is_channel | 1, falls die Zeichenkette ein gültiger IRC-Channelname für den Server ist | Server,Channel (Server ist optional)
@@ -28,10 +32,38 @@
| irc | irc_server_isupport_value | Wert der Funktion, sofern es vom Server unterstützt wird (durch IRC Message 005) | Server,Funktion
+| javascript | javascript_interpreter | name of the interpreter used | -
+
+| javascript | javascript_version | version of the interpreter used | -
+
+| lua | lua_interpreter | name of the interpreter used | -
+
+| lua | lua_version | version of the interpreter used | -
+
+| perl | perl_interpreter | name of the interpreter used | -
+
+| perl | perl_version | version of the interpreter used | -
+
+| php | php_interpreter | name of the interpreter used | -
+
+| php | php_version | version of the interpreter used | -
+
| python | python2_bin | Pfad für Python 2.x Interpreter | -
+| python | python_interpreter | name of the interpreter used | -
+
+| python | python_version | version of the interpreter used | -
+
| relay | relay_client_count | Anzahl an Clients für Relay | Statusname (optional): connecting, waiting_auth, connected, auth_failed, disconnected
+| ruby | ruby_interpreter | name of the interpreter used | -
+
+| ruby | ruby_version | version of the interpreter used | -
+
+| tcl | tcl_interpreter | name of the interpreter used | -
+
+| tcl | tcl_version | version of the interpreter used | -
+
| weechat | charset_internal | Interner WeeChat Zeichensatz | -
| weechat | charset_terminal | Terminal Zeichensatz | -
diff --git a/doc/en/autogen/plugin_api/infos.adoc b/doc/en/autogen/plugin_api/infos.adoc
index 8f0333f04..120a6535a 100644
--- a/doc/en/autogen/plugin_api/infos.adoc
+++ b/doc/en/autogen/plugin_api/infos.adoc
@@ -10,6 +10,10 @@
| fifo | fifo_filename | name of FIFO pipe | -
+| guile | guile_interpreter | name of the interpreter used | -
+
+| guile | guile_version | version of the interpreter used | -
+
| irc | irc_buffer | get buffer pointer for an IRC server/channel/nick | server,channel,nick (channel and nicks are optional)
| irc | irc_is_channel | 1 if string is a valid IRC channel name for server | server,channel (server is optional)
@@ -28,10 +32,38 @@
| irc | irc_server_isupport_value | value of feature, if supported by server (from IRC message 005) | server,feature
+| javascript | javascript_interpreter | name of the interpreter used | -
+
+| javascript | javascript_version | version of the interpreter used | -
+
+| lua | lua_interpreter | name of the interpreter used | -
+
+| lua | lua_version | version of the interpreter used | -
+
+| perl | perl_interpreter | name of the interpreter used | -
+
+| perl | perl_version | version of the interpreter used | -
+
+| php | php_interpreter | name of the interpreter used | -
+
+| php | php_version | version of the interpreter used | -
+
| python | python2_bin | path to python 2.x interpreter | -
+| python | python_interpreter | name of the interpreter used | -
+
+| python | python_version | version of the interpreter used | -
+
| relay | relay_client_count | number of clients for relay | status name (optional): connecting, waiting_auth, connected, auth_failed, disconnected
+| ruby | ruby_interpreter | name of the interpreter used | -
+
+| ruby | ruby_version | version of the interpreter used | -
+
+| tcl | tcl_interpreter | name of the interpreter used | -
+
+| tcl | tcl_version | version of the interpreter used | -
+
| weechat | charset_internal | WeeChat internal charset | -
| weechat | charset_terminal | terminal charset | -
diff --git a/doc/fr/autogen/plugin_api/infos.adoc b/doc/fr/autogen/plugin_api/infos.adoc
index 7dadbf0e6..ef16cd34d 100644
--- a/doc/fr/autogen/plugin_api/infos.adoc
+++ b/doc/fr/autogen/plugin_api/infos.adoc
@@ -10,6 +10,10 @@
| fifo | fifo_filename | nom du tube FIFO | -
+| guile | guile_interpreter | nom de l'interpréteur utilisé | -
+
+| guile | guile_version | version de l'interpréteur utilisé | -
+
| irc | irc_buffer | retourne le pointeur vers le tampon pour un serveur/canal/pseudo IRC | serveur,canal,pseudo (canal et pseudo sont optionnels)
| irc | irc_is_channel | 1 si la chaîne est un nom de canal IRC valide pour le serveur | serveur,canal (le serveur est optionnel)
@@ -28,10 +32,38 @@
| irc | irc_server_isupport_value | valeur de la fonctionnalité, si supportée par le serveur (du message IRC 005) | serveur,fonctionnalité
+| javascript | javascript_interpreter | nom de l'interpréteur utilisé | -
+
+| javascript | javascript_version | version de l'interpréteur utilisé | -
+
+| lua | lua_interpreter | nom de l'interpréteur utilisé | -
+
+| lua | lua_version | version de l'interpréteur utilisé | -
+
+| perl | perl_interpreter | nom de l'interpréteur utilisé | -
+
+| perl | perl_version | version de l'interpréteur utilisé | -
+
+| php | php_interpreter | nom de l'interpréteur utilisé | -
+
+| php | php_version | version de l'interpréteur utilisé | -
+
| python | python2_bin | chemin vers l'interpréteur python 2.x | -
+| python | python_interpreter | nom de l'interpréteur utilisé | -
+
+| python | python_version | version de l'interpréteur utilisé | -
+
| relay | relay_client_count | nombre de clients pour le relai | nom du statut (optionnel) : connecting, waiting_auth, connected, auth_failed, disconnected
+| ruby | ruby_interpreter | nom de l'interpréteur utilisé | -
+
+| ruby | ruby_version | version de l'interpréteur utilisé | -
+
+| tcl | tcl_interpreter | nom de l'interpréteur utilisé | -
+
+| tcl | tcl_version | version de l'interpréteur utilisé | -
+
| weechat | charset_internal | charset interne à WeeChat | -
| weechat | charset_terminal | charset du terminal | -
diff --git a/doc/it/autogen/plugin_api/infos.adoc b/doc/it/autogen/plugin_api/infos.adoc
index 2b04df954..62c11393b 100644
--- a/doc/it/autogen/plugin_api/infos.adoc
+++ b/doc/it/autogen/plugin_api/infos.adoc
@@ -10,6 +10,10 @@
| fifo | fifo_filename | nome della pipe FIFO | -
+| guile | guile_interpreter | name of the interpreter used | -
+
+| guile | guile_version | version of the interpreter used | -
+
| irc | irc_buffer | ottiene puntatore al buffer per un server/canale/nick IRC | server,canale,nick (canale e nick sono opzionali)
| irc | irc_is_channel | 1 se la stringa è il nome di un canale IRC valido per il server | server,canale (server è opzionale)
@@ -28,10 +32,38 @@
| irc | irc_server_isupport_value | valore della caratteristica, se supportata dal servre (dal messaggio IRC 005) | server,caratteristica
+| javascript | javascript_interpreter | name of the interpreter used | -
+
+| javascript | javascript_version | version of the interpreter used | -
+
+| lua | lua_interpreter | name of the interpreter used | -
+
+| lua | lua_version | version of the interpreter used | -
+
+| perl | perl_interpreter | name of the interpreter used | -
+
+| perl | perl_version | version of the interpreter used | -
+
+| php | php_interpreter | name of the interpreter used | -
+
+| php | php_version | version of the interpreter used | -
+
| python | python2_bin | path per l'interprete python 2.x | -
+| python | python_interpreter | name of the interpreter used | -
+
+| python | python_version | version of the interpreter used | -
+
| relay | relay_client_count | number of clients for relay | status name (optional): connecting, waiting_auth, connected, auth_failed, disconnected
+| ruby | ruby_interpreter | name of the interpreter used | -
+
+| ruby | ruby_version | version of the interpreter used | -
+
+| tcl | tcl_interpreter | name of the interpreter used | -
+
+| tcl | tcl_version | version of the interpreter used | -
+
| weechat | charset_internal | set caratteri interno di WeeChat | -
| weechat | charset_terminal | set caratteri terminale | -
diff --git a/doc/ja/autogen/plugin_api/infos.adoc b/doc/ja/autogen/plugin_api/infos.adoc
index d4e028522..1fbf9cbf5 100644
--- a/doc/ja/autogen/plugin_api/infos.adoc
+++ b/doc/ja/autogen/plugin_api/infos.adoc
@@ -10,6 +10,10 @@
| fifo | fifo_filename | FIFO パイプの名前 | -
+| guile | guile_interpreter | name of the interpreter used | -
+
+| guile | guile_version | version of the interpreter used | -
+
| irc | irc_buffer | ある IRC サーバ/チャンネル/ニックネームのバッファポインタを取得 | server,channel,nick (channel と nick は任意)
| irc | irc_is_channel | 文字列がサーバの有効な IRC チャンネル名なら 1 | サーバ、チャンネル (サーバは任意)
@@ -28,10 +32,38 @@
| irc | irc_server_isupport_value | サーバがサポートする場合、機能の値 (IRC メッセージ 005 を使う) | サーバ、機能
+| javascript | javascript_interpreter | name of the interpreter used | -
+
+| javascript | javascript_version | version of the interpreter used | -
+
+| lua | lua_interpreter | name of the interpreter used | -
+
+| lua | lua_version | version of the interpreter used | -
+
+| perl | perl_interpreter | name of the interpreter used | -
+
+| perl | perl_version | version of the interpreter used | -
+
+| php | php_interpreter | name of the interpreter used | -
+
+| php | php_version | version of the interpreter used | -
+
| python | python2_bin | python 2.x インタプリタへのパス | -
+| python | python_interpreter | name of the interpreter used | -
+
+| python | python_version | version of the interpreter used | -
+
| relay | relay_client_count | 中継するクライアントのリスト | 状態名 (任意): connecting、waiting_auth、connected、auth_failed、disconnected
+| ruby | ruby_interpreter | name of the interpreter used | -
+
+| ruby | ruby_version | version of the interpreter used | -
+
+| tcl | tcl_interpreter | name of the interpreter used | -
+
+| tcl | tcl_version | version of the interpreter used | -
+
| weechat | charset_internal | WeeChat 内部文字セット | -
| weechat | charset_terminal | 端末の文字セット | -
diff --git a/doc/pl/autogen/plugin_api/infos.adoc b/doc/pl/autogen/plugin_api/infos.adoc
index 5e612e1b9..b77a21f34 100644
--- a/doc/pl/autogen/plugin_api/infos.adoc
+++ b/doc/pl/autogen/plugin_api/infos.adoc
@@ -10,6 +10,10 @@
| fifo | fifo_filename | nazwa strumienia FIFO | -
+| guile | guile_interpreter | name of the interpreter used | -
+
+| guile | guile_version | version of the interpreter used | -
+
| irc | irc_buffer | pobiera wskaźnik dla serwera/kanału/nicku IRC | serwer,kanał,nick (kanał oraz nick są opcjonalne)
| irc | irc_is_channel | 1 jeśli ciąg jest poprawną nazwą kanału IRC dla serwera | serwer,kanał (serWer jest opcjonalny)
@@ -28,10 +32,38 @@
| irc | irc_server_isupport_value | wartość opcji, jeśli jest wpierana przez serwer (z wiadomości IRC 005) | serwer,właściwość
+| javascript | javascript_interpreter | name of the interpreter used | -
+
+| javascript | javascript_version | version of the interpreter used | -
+
+| lua | lua_interpreter | name of the interpreter used | -
+
+| lua | lua_version | version of the interpreter used | -
+
+| perl | perl_interpreter | name of the interpreter used | -
+
+| perl | perl_version | version of the interpreter used | -
+
+| php | php_interpreter | name of the interpreter used | -
+
+| php | php_version | version of the interpreter used | -
+
| python | python2_bin | ścieżka do interpretera pythona 2.x | -
+| python | python_interpreter | name of the interpreter used | -
+
+| python | python_version | version of the interpreter used | -
+
| relay | relay_client_count | liczba podłączonych klientów | nazwa statusu (opcjonalne): łączenie, oczekiwanie na uwierzytelnienie, połączono, uwierzytelnienie nieudane, rozłączono
+| ruby | ruby_interpreter | name of the interpreter used | -
+
+| ruby | ruby_version | version of the interpreter used | -
+
+| tcl | tcl_interpreter | name of the interpreter used | -
+
+| tcl | tcl_version | version of the interpreter used | -
+
| weechat | charset_internal | wewnętrzne kodowanie WeeChat | -
| weechat | charset_terminal | kodowanie terminala | -
diff --git a/po/cs.po b/po/cs.po
index 7f0c849de..d00775294 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: 2017-12-23 20:29+0100\n"
+"POT-Creation-Date: 2017-12-23 21:13+0100\n"
"PO-Revision-Date: 2017-10-17 20:12+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10248,6 +10248,13 @@ msgstr "ukazatel skriptu (volitelný)"
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr "jméno serveru (zástupný znak \"*\" je povolen) (volitelný)"
+#, fuzzy
+msgid "name of the interpreter used"
+msgstr "%s%s: nemohu uvolnit interpreter"
+
+msgid "version of the interpreter used"
+msgstr ""
+
#, fuzzy, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
diff --git a/po/de.po b/po/de.po
index a3379f72e..cd4fb91de 100644
--- a/po/de.po
+++ b/po/de.po
@@ -19,7 +19,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2017-12-23 20:29+0100\n"
+"POT-Creation-Date: 2017-12-23 21:13+0100\n"
"PO-Revision-Date: 2017-12-11 20:59+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -12006,6 +12006,13 @@ msgstr "Skript Pointer (optional)"
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr "Name des Skriptes (Platzhalter \"*\" kann verwendet werden) (optional)"
+#, fuzzy
+msgid "name of the interpreter used"
+msgstr "%s%s: Interpreter kann nicht freigeben werden"
+
+msgid "version of the interpreter used"
+msgstr ""
+
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
diff --git a/po/es.po b/po/es.po
index 00286df18..348c45d01 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: 2017-12-23 20:29+0100\n"
+"POT-Creation-Date: 2017-12-23 21:13+0100\n"
"PO-Revision-Date: 2017-10-17 20:12+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10589,6 +10589,13 @@ msgstr ""
"nombre del script (puede empezar o terminar con \"*\" como comodín) "
"(opcional)"
+#, fuzzy
+msgid "name of the interpreter used"
+msgstr "%s%s: no es posible liberar el interprete"
+
+msgid "version of the interpreter used"
+msgstr ""
+
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
diff --git a/po/fr.po b/po/fr.po
index 331278fac..0322be53f 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: 2017-12-23 20:29+0100\n"
-"PO-Revision-Date: 2017-12-23 20:34+0100\n"
+"POT-Creation-Date: 2017-12-23 21:13+0100\n"
+"PO-Revision-Date: 2017-12-23 21:14+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -11741,6 +11741,12 @@ msgstr "pointeur vers le script (optionnel)"
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr "nom de script (le caractère joker \"*\" est autorisé) (optionnel)"
+msgid "name of the interpreter used"
+msgstr "nom de l'interpréteur utilisé"
+
+msgid "version of the interpreter used"
+msgstr "version de l'interpréteur utilisé"
+
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
diff --git a/po/hu.po b/po/hu.po
index 164e9fefc..c5cdfa120 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: 2017-12-23 20:29+0100\n"
+"POT-Creation-Date: 2017-12-23 21:13+0100\n"
"PO-Revision-Date: 2017-10-17 20:14+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9618,6 +9618,13 @@ msgstr ""
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr ""
+#, fuzzy
+msgid "name of the interpreter used"
+msgstr "%s nem sikerült a szervert létrehozni\n"
+
+msgid "version of the interpreter used"
+msgstr ""
+
#, fuzzy, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
diff --git a/po/it.po b/po/it.po
index a71fa98a3..427243236 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: 2017-12-23 20:29+0100\n"
+"POT-Creation-Date: 2017-12-23 21:13+0100\n"
"PO-Revision-Date: 2017-10-17 20:14+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10781,6 +10781,13 @@ msgstr ""
"nome script (può iniziare o terminare con \"*\" come carattere jolly) "
"(opzionale)"
+#, fuzzy
+msgid "name of the interpreter used"
+msgstr "%s%s: impossibile liberare l'interprete"
+
+msgid "version of the interpreter used"
+msgstr ""
+
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
diff --git a/po/ja.po b/po/ja.po
index 368b71efd..f4d11a3ab 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: 2017-12-23 20:29+0100\n"
+"POT-Creation-Date: 2017-12-23 21:13+0100\n"
"PO-Revision-Date: 2017-11-18 09:00+0900\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -11293,6 +11293,13 @@ msgstr "スクリプトポインタ (任意)"
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr "スクリプト名 (ワイルドカード \"*\" を使うことができます) (任意)"
+#, fuzzy
+msgid "name of the interpreter used"
+msgstr "%s%s: インタプリタの開放に失敗"
+
+msgid "version of the interpreter used"
+msgstr ""
+
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
diff --git a/po/pl.po b/po/pl.po
index 173cb4ec6..96a176c35 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2017-12-23 20:29+0100\n"
+"POT-Creation-Date: 2017-12-23 21:13+0100\n"
"PO-Revision-Date: 2017-11-15 07:23+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -11485,6 +11485,13 @@ msgstr "wskaźnik skryptu (opcjonalne)"
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr "nazwa skryptu (wildcard \"*\" jest dozwolony) (opcjonalne)"
+#, fuzzy
+msgid "name of the interpreter used"
+msgstr "%s%s: nie można zwolnić interpretera"
+
+msgid "version of the interpreter used"
+msgstr ""
+
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
diff --git a/po/pt.po b/po/pt.po
index 632bbfe45..46c71fafa 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: 2017-12-23 20:29+0100\n"
+"POT-Creation-Date: 2017-12-23 21:13+0100\n"
"PO-Revision-Date: 2017-11-15 07:24+0100\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -11193,6 +11193,13 @@ msgstr "ponteiro para script (opcional)"
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr "nome do script (o caráter universal \"*\" é permitido) (opcional)"
+#, fuzzy
+msgid "name of the interpreter used"
+msgstr "%s%s: não foi possível libertar o interpretador"
+
+msgid "version of the interpreter used"
+msgstr ""
+
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 80f7438a5..1ac1a9ebb 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: 2017-12-23 20:29+0100\n"
+"POT-Creation-Date: 2017-12-23 21:13+0100\n"
"PO-Revision-Date: 2017-10-17 20:14+0200\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10100,6 +10100,13 @@ msgstr ""
"nome do script (pode começar ou terminar com \"*\" como um coringa) "
"(opcional)"
+#, fuzzy
+msgid "name of the interpreter used"
+msgstr "%s%s: não foi possível liberar interpretador"
+
+msgid "version of the interpreter used"
+msgstr ""
+
#, fuzzy, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
diff --git a/po/ru.po b/po/ru.po
index 1a33f9524..0fc8aea2a 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: 2017-12-23 20:29+0100\n"
+"POT-Creation-Date: 2017-12-23 21:13+0100\n"
"PO-Revision-Date: 2017-10-17 20:14+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9654,6 +9654,13 @@ msgstr ""
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr ""
+#, fuzzy
+msgid "name of the interpreter used"
+msgstr "%s не могу создать сервер\n"
+
+msgid "version of the interpreter used"
+msgstr ""
+
#, fuzzy, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
diff --git a/po/tr.po b/po/tr.po
index 5145e83c1..ada0cbd05 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: 2017-12-23 20:29+0100\n"
+"POT-Creation-Date: 2017-12-23 21:13+0100\n"
"PO-Revision-Date: 2017-06-26 23:33+0200\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -8752,6 +8752,12 @@ msgstr ""
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr ""
+msgid "name of the interpreter used"
+msgstr ""
+
+msgid "version of the interpreter used"
+msgstr ""
+
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
diff --git a/po/weechat.pot b/po/weechat.pot
index ae5e3b434..bcdd449b4 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: 2017-12-23 20:29+0100\n"
+"POT-Creation-Date: 2017-12-23 21:13+0100\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"
@@ -8633,6 +8633,12 @@ msgstr ""
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr ""
+msgid "name of the interpreter used"
+msgstr ""
+
+msgid "version of the interpreter used"
+msgstr ""
+
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
diff --git a/src/plugins/plugin-script.c b/src/plugins/plugin-script.c
index 2dc129142..cd69a66a0 100644
--- a/src/plugins/plugin-script.c
+++ b/src/plugins/plugin-script.c
@@ -133,6 +133,50 @@ plugin_script_signal_debug_libs_cb (const void *pointer, void *data,
}
/*
+ * Callback for info "xxx_interpreter".
+ */
+
+const char *
+plugin_script_info_interpreter_cb (const void *pointer, void *data,
+ const char *info_name,
+ const char *arguments)
+{
+ struct t_weechat_plugin *weechat_plugin;
+
+ /* make C compiler happy */
+ (void) data;
+ (void) info_name;
+ (void) arguments;
+
+ weechat_plugin = (struct t_weechat_plugin *)pointer;
+
+ return weechat_hashtable_get (weechat_plugin->variables,
+ "interpreter_name");
+}
+
+/*
+ * Callback for info "xxx_version".
+ */
+
+const char *
+plugin_script_info_version_cb (const void *pointer, void *data,
+ const char *info_name,
+ const char *arguments)
+{
+ struct t_weechat_plugin *weechat_plugin;
+
+ /* make C compiler happy */
+ (void) data;
+ (void) info_name;
+ (void) arguments;
+
+ weechat_plugin = (struct t_weechat_plugin *)pointer;
+
+ return weechat_hashtable_get (weechat_plugin->variables,
+ "interpreter_version");
+}
+
+/*
* Creates directories for plugin in WeeChat home:
* - ~/.weechat/XXX/
* - ~/.weechat/XXX/autoload/
@@ -170,46 +214,36 @@ plugin_script_init (struct t_weechat_plugin *weechat_plugin,
int argc, char *argv[],
struct t_plugin_script_init *init)
{
- char *string, *completion, signal_name[128];
+ char string[512], *completion;
char *action_signals[] = { "install", "remove", "autoload", NULL };
- int length, i, auto_load_scripts;
+ int i, auto_load_scripts;
/* read script configuration */
plugin_script_config_read (weechat_plugin);
/* add hook for configuration option */
- length = strlen (weechat_plugin->name) + 64;
- string = malloc (length);
- if (string)
- {
- snprintf (string, length, "plugins.var.%s.%s",
- weechat_plugin->name, SCRIPT_OPTION_CHECK_LICENSE);
- weechat_hook_config (string,
- &plugin_script_config_cb, weechat_plugin, NULL);
- free (string);
- }
+ snprintf (string, sizeof (string),
+ "plugins.var.%s.%s",
+ weechat_plugin->name,
+ SCRIPT_OPTION_CHECK_LICENSE);
+ weechat_hook_config (string,
+ &plugin_script_config_cb, weechat_plugin, NULL);
/* create directories in WeeChat home */
plugin_script_create_dirs (weechat_plugin);
/* add command */
completion = NULL;
- length = strlen (weechat_plugin->name) + 16;
- string = malloc (length);
- if (string)
- {
- snprintf (string, length, "%%(%s_script)",
- weechat_plugin->name);
- completion = weechat_string_replace ("list %s"
- " || listfull %s"
- " || load %(filename)"
- " || autoload"
- " || reload %s"
- " || unload %s"
- " || version",
- "%s",
- string);
- }
+ snprintf (string, sizeof (string), "%%(%s_script)", weechat_plugin->name);
+ completion = weechat_string_replace ("list %s"
+ " || listfull %s"
+ " || load %(filename)"
+ " || autoload"
+ " || reload %s"
+ " || unload %s"
+ " || version",
+ "%s",
+ string);
weechat_hook_command (
weechat_plugin->name,
N_("list/load/unload scripts"),
@@ -234,28 +268,20 @@ plugin_script_init (struct t_weechat_plugin *weechat_plugin,
"Without argument, this command lists all loaded scripts."),
completion,
init->callback_command, NULL, NULL);
- if (string)
- free (string);
if (completion)
free (completion);
/* add completion, hdata and infolist */
- length = strlen (weechat_plugin->name) + 64;
- string = malloc (length);
- if (string)
- {
- snprintf (string, length, "%s_script", weechat_plugin->name);
- weechat_hook_completion (string, N_("list of scripts"),
- init->callback_completion, NULL, NULL);
- weechat_hook_hdata (string, N_("list of scripts"),
- init->callback_hdata, weechat_plugin, NULL);
- weechat_hook_infolist (string, N_("list of scripts"),
- N_("script pointer (optional)"),
- N_("script name (wildcard \"*\" is allowed) "
- "(optional)"),
- init->callback_infolist, NULL, NULL);
- free (string);
- }
+ snprintf (string, sizeof (string), "%s_script", weechat_plugin->name);
+ weechat_hook_completion (string, N_("list of scripts"),
+ init->callback_completion, NULL, NULL);
+ weechat_hook_hdata (string, N_("list of scripts"),
+ init->callback_hdata, weechat_plugin, NULL);
+ weechat_hook_infolist (string, N_("list of scripts"),
+ N_("script pointer (optional)"),
+ N_("script name (wildcard \"*\" is allowed) "
+ "(optional)"),
+ init->callback_infolist, NULL, NULL);
/* add signal for "debug_dump" */
weechat_hook_signal ("debug_dump",
@@ -269,13 +295,22 @@ plugin_script_init (struct t_weechat_plugin *weechat_plugin,
/* add signals for script actions (install/remove/autoload) */
for (i = 0; action_signals[i]; i++)
{
- snprintf (signal_name, sizeof (signal_name), "%s_script_%s",
- weechat_plugin->name,
- action_signals[i]);
- weechat_hook_signal (signal_name,
+ snprintf (string, sizeof (string),
+ "%s_script_%s", weechat_plugin->name, action_signals[i]);
+ weechat_hook_signal (string,
init->callback_signal_script_action, NULL, NULL);
}
+ /* add infos */
+ snprintf (string, sizeof (string), "%s_interpreter", weechat_plugin->name);
+ weechat_hook_info (string, N_("name of the interpreter used"), NULL,
+ &plugin_script_info_interpreter_cb,
+ weechat_plugin, NULL);
+ snprintf (string, sizeof (string), "%s_version", weechat_plugin->name);
+ weechat_hook_info (string, N_("version of the interpreter used"), NULL,
+ &plugin_script_info_version_cb,
+ weechat_plugin, NULL);
+
/* parse arguments */
auto_load_scripts = 1;
for (i = 0; i < argc; i++)