summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-06-05 14:56:14 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-06-05 14:56:14 +0200
commitfa3a4355ce111aecc5ed668d02cb40c5a52cc8d8 (patch)
tree468bed5d27a36e0e74cf1e991f0a2c7d0b0e7612
parent4947ed6d31e9d582975fa011531bf15eb0252e3c (diff)
downloadweechat-fa3a4355ce111aecc5ed668d02cb40c5a52cc8d8.zip
buflist: display a warning when the script "buffers.pl" is loaded
-rw-r--r--ChangeLog.adoc1
-rw-r--r--po/cs.po10
-rw-r--r--po/de.po10
-rw-r--r--po/es.po10
-rw-r--r--po/fr.po17
-rw-r--r--po/hu.po10
-rw-r--r--po/it.po10
-rw-r--r--po/ja.po10
-rw-r--r--po/pl.po10
-rw-r--r--po/pt.po10
-rw-r--r--po/pt_BR.po10
-rw-r--r--po/ru.po10
-rw-r--r--po/tr.po10
-rw-r--r--po/weechat.pot10
-rw-r--r--src/plugins/buflist/buflist.c42
15 files changed, 165 insertions, 15 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index 4ede9d842..68ac5a4f1 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -26,6 +26,7 @@ New features::
Improvements::
* core: allow index for hdata arrays in evaluation of expressions
+ * buflist: display a warning when the script "buffers.pl" is loaded
* buflist: add support of char "~" in option buflist.look.sort for case insensitive comparison
* buflist: add variable `${current_buffer}` (boolean "0" / "1") in bar item evaluation
* trigger: add "irc_server" and "irc_channel" pointers in data for IRC signal/modifier hooks
diff --git a/po/cs.po b/po/cs.po
index 03c1f6e59..f5e4e52f1 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-06-02 19:56+0200\n"
+"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-05-13 22:06+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4904,6 +4904,14 @@ msgstr "%s%s: nemohu vytvořit server \"%s\""
msgid "Buffers list"
msgstr "Seznam bufferů"
+#, c-format
+msgid ""
+"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
+"list of buffers similar to the buflist plugin; you may want to uninstall the "
+"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
+"plugin; see WeeChat release notes for more information"
+msgstr ""
+
#, fuzzy
msgid "bar item with list of buffers"
msgstr "seznam bufferů"
diff --git a/po/de.po b/po/de.po
index be3006ca3..fa52748ba 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-06-02 19:56+0200\n"
+"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-06-02 20:00+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -5795,6 +5795,14 @@ msgstr ""
msgid "Buffers list"
msgstr "Liste von Buffern"
+#, c-format
+msgid ""
+"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
+"list of buffers similar to the buflist plugin; you may want to uninstall the "
+"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
+"plugin; see WeeChat release notes for more information"
+msgstr ""
+
msgid "bar item with list of buffers"
msgstr "Bar-Item mit der Liste von Buffern"
diff --git a/po/es.po b/po/es.po
index e2850c7e5..b5132b8a2 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-06-02 19:56+0200\n"
+"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-01-06 22:01+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5118,6 +5118,14 @@ msgstr "%s%s: no es posible crear el servidor \"%s\""
msgid "Buffers list"
msgstr "Lista de buffers:"
+#, c-format
+msgid ""
+"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
+"list of buffers similar to the buflist plugin; you may want to uninstall the "
+"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
+"plugin; see WeeChat release notes for more information"
+msgstr ""
+
#, fuzzy
msgid "bar item with list of buffers"
msgstr "lista de buffers"
diff --git a/po/fr.po b/po/fr.po
index c893d8586..a79cd38ab 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-06-02 19:56+0200\n"
-"PO-Revision-Date: 2017-06-02 19:59+0200\n"
+"POT-Creation-Date: 2017-06-05 14:55+0200\n"
+"PO-Revision-Date: 2017-06-05 14:55+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -5666,6 +5666,19 @@ msgstr ""
msgid "Buffers list"
msgstr "Liste des tampons"
+#, c-format
+msgid ""
+"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
+"list of buffers similar to the buflist plugin; you may want to uninstall the "
+"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
+"plugin; see WeeChat release notes for more information"
+msgstr ""
+"%sbuflist : attention : le script buffers.pl est chargé et fournit une barre "
+"avec la liste des tampons similaire à celle de l'extension buflist ; vous "
+"voudrez peut-être désinstaller le script buffers.pl (/script remove buffers."
+"pl) ou désactiver/décharger l'extension buflist ; voir les notes de version "
+"de WeeChat pour plus d'information"
+
msgid "bar item with list of buffers"
msgstr "objet de barre avec la liste des tampons"
diff --git a/po/hu.po b/po/hu.po
index e37e1a701..97fe86444 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-06-02 19:56+0200\n"
+"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-01-06 22:03+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4442,6 +4442,14 @@ msgstr "%s nem sikerült a szervert létrehozni\n"
msgid "Buffers list"
msgstr "hotlist törlése"
+#, c-format
+msgid ""
+"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
+"list of buffers similar to the buflist plugin; you may want to uninstall the "
+"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
+"plugin; see WeeChat release notes for more information"
+msgstr ""
+
#, fuzzy
msgid "bar item with list of buffers"
msgstr "Aliaszok listája:\n"
diff --git a/po/it.po b/po/it.po
index e00181a34..88effd5d9 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-06-02 19:56+0200\n"
+"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-01-06 22:04+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5256,6 +5256,14 @@ msgstr "%s%s: impossibile creare il server \"%s\""
msgid "Buffers list"
msgstr "Elenco buffer:"
+#, c-format
+msgid ""
+"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
+"list of buffers similar to the buflist plugin; you may want to uninstall the "
+"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
+"plugin; see WeeChat release notes for more information"
+msgstr ""
+
#, fuzzy
msgid "bar item with list of buffers"
msgstr "elenco dei buffer"
diff --git a/po/ja.po b/po/ja.po
index 28dbb0015..875fbc3eb 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-06-02 19:56+0200\n"
+"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-06-03 09:00+0900\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -5401,6 +5401,14 @@ msgstr "%s%s: エラー: 言語 \"%s\" のスペラーを作成できません"
msgid "Buffers list"
msgstr "バッファリスト"
+#, c-format
+msgid ""
+"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
+"list of buffers similar to the buflist plugin; you may want to uninstall the "
+"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
+"plugin; see WeeChat release notes for more information"
+msgstr ""
+
msgid "bar item with list of buffers"
msgstr "バッファのリストを表示するバー要素"
diff --git a/po/pl.po b/po/pl.po
index 8585d9b80..f561ab283 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-06-02 19:56+0200\n"
+"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-04-08 14:49+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5536,6 +5536,14 @@ msgstr "%s%s: błąd: nie można utworzyć słownika dla języka \"%s\""
msgid "Buffers list"
msgstr "Lista buforów"
+#, c-format
+msgid ""
+"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
+"list of buffers similar to the buflist plugin; you may want to uninstall the "
+"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
+"plugin; see WeeChat release notes for more information"
+msgstr ""
+
msgid "bar item with list of buffers"
msgstr "element paska z listą buforów"
diff --git a/po/pt.po b/po/pt.po
index 895596d34..0d9a42dad 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-06-02 19:56+0200\n"
+"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-04-08 14:50+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -5512,6 +5512,14 @@ msgstr ""
msgid "Buffers list"
msgstr "Lista de buffers:"
+#, c-format
+msgid ""
+"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
+"list of buffers similar to the buflist plugin; you may want to uninstall the "
+"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
+"plugin; see WeeChat release notes for more information"
+msgstr ""
+
#, fuzzy
msgid "bar item with list of buffers"
msgstr "lista de buffers"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index b5163d46d..3ac5fb772 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-06-02 19:56+0200\n"
+"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2016-09-03 08:24+0200\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5058,6 +5058,14 @@ msgstr "%s%s: não foi possível criar diretório para registros (\"%s\")"
msgid "Buffers list"
msgstr "Lista de buffers:"
+#, c-format
+msgid ""
+"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
+"list of buffers similar to the buflist plugin; you may want to uninstall the "
+"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
+"plugin; see WeeChat release notes for more information"
+msgstr ""
+
#, fuzzy
msgid "bar item with list of buffers"
msgstr "lista de buffers"
diff --git a/po/ru.po b/po/ru.po
index 756101884..de7f56404 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-06-02 19:56+0200\n"
+"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-01-06 22:06+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4480,6 +4480,14 @@ msgstr "%s не могу создать сервер \"%s\"\n"
msgid "Buffers list"
msgstr "Список буферов:"
+#, c-format
+msgid ""
+"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
+"list of buffers similar to the buflist plugin; you may want to uninstall the "
+"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
+"plugin; see WeeChat release notes for more information"
+msgstr ""
+
#, fuzzy
msgid "bar item with list of buffers"
msgstr "Список сокращений:\n"
diff --git a/po/tr.po b/po/tr.po
index 8bd6cf7a5..b4dea0def 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-06-02 19:56+0200\n"
+"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-01-06 22:07+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4046,6 +4046,14 @@ msgstr ""
msgid "Buffers list"
msgstr "Xfer listesi:"
+#, c-format
+msgid ""
+"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
+"list of buffers similar to the buflist plugin; you may want to uninstall the "
+"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
+"plugin; see WeeChat release notes for more information"
+msgstr ""
+
msgid "bar item with list of buffers"
msgstr ""
diff --git a/po/weechat.pot b/po/weechat.pot
index 58052010e..377ec8046 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-06-02 19:56+0200\n"
+"POT-Creation-Date: 2017-06-05 14:55+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"
@@ -4031,6 +4031,14 @@ msgstr ""
msgid "Buffers list"
msgstr ""
+#, c-format
+msgid ""
+"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
+"list of buffers similar to the buflist plugin; you may want to uninstall the "
+"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
+"plugin; see WeeChat release notes for more information"
+msgstr ""
+
msgid "bar item with list of buffers"
msgstr ""
diff --git a/src/plugins/buflist/buflist.c b/src/plugins/buflist/buflist.c
index 8db714018..42ff7c687 100644
--- a/src/plugins/buflist/buflist.c
+++ b/src/plugins/buflist/buflist.c
@@ -351,6 +351,44 @@ buflist_sort_buffers ()
}
/*
+ * Callback called when a Perl script is loaded: if the script is buffers.pl,
+ * then we display a warning.
+ */
+
+int
+buflist_script_loaded_cb (const void *pointer, void *data, const char *signal,
+ const char *type_data, void *signal_data)
+{
+ int length;
+
+ /* make C compiler happy */
+ (void) pointer;
+ (void) data;
+ (void) signal;
+ (void) type_data;
+
+ if (!signal_data)
+ return WEECHAT_RC_OK;
+
+ length = strlen (signal_data);
+ if ((length >= 10)
+ && (strncmp (signal_data + length - 10, "buffers.pl", 10) == 0))
+ {
+ weechat_printf (NULL,
+ _("%sbuflist: warning: the script buffers.pl is "
+ "loaded and provides a bar with list of buffers "
+ "similar to the buflist plugin; you may want to "
+ "uninstall the script buffers.pl "
+ "(/script remove buffers.pl) or disable/unload the "
+ "buflist plugin; see WeeChat release notes for more "
+ "information"),
+ weechat_prefix ("error"));
+ }
+
+ return WEECHAT_RC_OK;
+}
+
+/*
* Initializes buflist plugin.
*/
@@ -420,9 +458,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_hashtable_set (keys, "__quiet", "1");
weechat_key_bind ("mouse", keys);
}
-
weechat_hashtable_free (keys);
+ weechat_hook_signal ("perl_script_loaded",
+ &buflist_script_loaded_cb, NULL, NULL);
+
return WEECHAT_RC_OK;
}