summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-04-16 10:47:18 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-04-16 10:47:18 +0200
commit7426569d8680711e9ff22d5c86c631504f23559b (patch)
treead44276801c10ebb02d4efd281ad90346676fcea
parent619f470f9fc152b599ee6c92207c358f555e4c51 (diff)
downloadweechat-7426569d8680711e9ff22d5c86c631504f23559b.zip
core: prohibit names beginning with "#" for bars, proxies, filters and IRC servers (bug #33020)
-rw-r--r--ChangeLog4
-rw-r--r--po/cs.po10
-rw-r--r--po/de.po10
-rw-r--r--po/es.po10
-rw-r--r--po/fr.po12
-rw-r--r--po/hu.po10
-rw-r--r--po/it.po10
-rw-r--r--po/pl.po10
-rw-r--r--po/pt_BR.po10
-rw-r--r--po/ru.po10
-rw-r--r--po/weechat.pot10
-rw-r--r--src/core/wee-command.c21
-rw-r--r--src/plugins/irc/irc-command.c7
13 files changed, 122 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index e02265344..f1d595943 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,14 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
-v0.3.5-dev, 2011-04-15
+v0.3.5-dev, 2011-04-16
Version 0.3.5 (under dev!)
--------------------------
+* core: prohibit names beginning with "#" for bars, proxies, filters and IRC
+ servers (bug #33020)
* core: add option weechat.look.hotlist_buffer_separator
* core: add messages counts in hotlist for each buffer, new options:
weechat.look.hotlist_count_max, weechat.look.hotlist_count_min_msg and
diff --git a/po/cs.po b/po/cs.po
index 18acec30e..3dd978b75 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-15 12:10+0200\n"
+"POT-Creation-Date: 2011-04-16 10:41+0200\n"
"PO-Revision-Date: 2011-04-10 17:32+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -145,6 +145,10 @@ msgstr " %s (plugin: %s)"
msgid "No bar item defined"
msgstr "Žádné položky pole nejsou definovány"
+#, fuzzy, c-format
+msgid "%sError: name can not start with \"#\""
+msgstr "%sChyba: nemohu vytvořit soubor \"%s\""
+
#, c-format
msgid "%sNot enough memory"
msgstr "%sNedostatek paměti"
@@ -3535,6 +3539,10 @@ msgstr "Žádný server s \"%s\" nenalezen"
msgid "%s%s: server \"%s\" already exists, can't create it!"
msgstr "%s%s: server \"%s\" již existuje, nemohu jej vytvořít!"
+#, fuzzy, c-format
+msgid "%s%s: name can not start with \"#\""
+msgstr "%s%s: nemohu přistupovat k souboru \"%s\""
+
#, c-format
msgid "%s%s: unable to create server"
msgstr "%s%s: nemohu vytvořit server"
diff --git a/po/de.po b/po/de.po
index bc3118d5f..37258dabc 100644
--- a/po/de.po
+++ b/po/de.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-15 12:10+0200\n"
+"POT-Creation-Date: 2011-04-16 10:41+0200\n"
"PO-Revision-Date: 2011-04-15 21:04+0100\n"
"Last-Translator: Nils G.\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -153,6 +153,10 @@ msgstr " %s (Erweiterung: %s)"
msgid "No bar item defined"
msgstr "Es wurde kein Bar-Item festgelegt"
+#, fuzzy, c-format
+msgid "%sError: name can not start with \"#\""
+msgstr "%sFehler: kann die Datei \"%s\" nicht erstellen"
+
#, c-format
msgid "%sNot enough memory"
msgstr "%sNicht genügend Speicher"
@@ -3782,6 +3786,10 @@ msgstr ""
"%s%s: Der Server \"%s\" existiert bereits und kann daher nicht angelegt "
"werden!"
+#, fuzzy, c-format
+msgid "%s%s: name can not start with \"#\""
+msgstr "%s%s: Es kann nicht auf die Datei \"%s\" zugreifen werden"
+
#, c-format
msgid "%s%s: unable to create server"
msgstr "%s%s: Kann den Server nicht anlegen"
diff --git a/po/es.po b/po/es.po
index 2735b64a4..18e86b406 100644
--- a/po/es.po
+++ b/po/es.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-15 12:10+0200\n"
+"POT-Creation-Date: 2011-04-16 10:41+0200\n"
"PO-Revision-Date: 2011-04-10 17:31+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -146,6 +146,10 @@ msgstr " %s (plugin: %s)"
msgid "No bar item defined"
msgstr "Ningún elemento definido"
+#, fuzzy, c-format
+msgid "%sError: name can not start with \"#\""
+msgstr "%sError: no es posible crear el archivo \"%s\""
+
#, c-format
msgid "%sNot enough memory"
msgstr "%sNo hay suficiente memoria"
@@ -3615,6 +3619,10 @@ msgstr "Ningún servidor encontrado con \"%s\""
msgid "%s%s: server \"%s\" already exists, can't create it!"
msgstr "%s%s: el servidor \"%s\" ya existe, ¡no se puede crear!"
+#, fuzzy, c-format
+msgid "%s%s: name can not start with \"#\""
+msgstr "%s%s: no es posible acceder el archivo \"%s\""
+
#, c-format
msgid "%s%s: unable to create server"
msgstr "%s%s: no es posible crear el servidor"
diff --git a/po/fr.po b/po/fr.po
index c888b99ea..4c49a3c3e 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-15 12:10+0200\n"
-"PO-Revision-Date: 2011-04-15 12:02+0200\n"
+"POT-Creation-Date: 2011-04-16 10:41+0200\n"
+"PO-Revision-Date: 2011-04-16 10:42+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@@ -148,6 +148,10 @@ msgid "No bar item defined"
msgstr "Pas d'objet de barre défini"
#, c-format
+msgid "%sError: name can not start with \"#\""
+msgstr "%sErreur: le nom ne peut pas commencer par \"#\""
+
+#, c-format
msgid "%sNot enough memory"
msgstr "%sPas assez de mémoire"
@@ -3708,6 +3712,10 @@ msgid "%s%s: server \"%s\" already exists, can't create it!"
msgstr "%s%s: le serveur \"%s\" existe déjà, impossible de le créer !"
#, c-format
+msgid "%s%s: name can not start with \"#\""
+msgstr "%s%s: le nom ne peut pas commencer par \"#\""
+
+#, c-format
msgid "%s%s: unable to create server"
msgstr "%s%s: impossible de créer le serveur"
diff --git a/po/hu.po b/po/hu.po
index fe5f55a29..991d89fc6 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-15 12:10+0200\n"
+"POT-Creation-Date: 2011-04-16 10:41+0200\n"
"PO-Revision-Date: 2011-04-10 11:21+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -148,6 +148,10 @@ msgid "No bar item defined"
msgstr "Nincs aliasz definiálva.\n"
#, fuzzy, c-format
+msgid "%sError: name can not start with \"#\""
+msgstr "%s nem sikerült a \"%s\" fájlt létrehozni\n"
+
+#, fuzzy, c-format
msgid "%sNot enough memory"
msgstr "Nincs elég memória az új sorhoz\n"
@@ -3294,6 +3298,10 @@ msgid "%s%s: server \"%s\" already exists, can't create it!"
msgstr "%s a \"%s\" szerver már létezik, nem hozhatja létre!\n"
#, fuzzy, c-format
+msgid "%s%s: name can not start with \"#\""
+msgstr "%s nem sikerült a(z) \"%s\" fájlt elérni\n"
+
+#, fuzzy, c-format
msgid "%s%s: unable to create server"
msgstr "%s nem sikerült a szervert létrehozni\n"
diff --git a/po/it.po b/po/it.po
index e1813ad07..70aa0699f 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-15 12:10+0200\n"
+"POT-Creation-Date: 2011-04-16 10:41+0200\n"
"PO-Revision-Date: 2011-04-10 17:33+0200\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -145,6 +145,10 @@ msgstr " %s (plugin: %s)"
msgid "No bar item defined"
msgstr "Nessun elemento barra definito"
+#, fuzzy, c-format
+msgid "%sError: name can not start with \"#\""
+msgstr "%sErrore: impossibile creare il file \"%s\""
+
#, c-format
msgid "%sNot enough memory"
msgstr "%sSpazio non sufficiente"
@@ -3670,6 +3674,10 @@ msgstr "Nessun server trovato con \"%s\""
msgid "%s%s: server \"%s\" already exists, can't create it!"
msgstr "%s%s: il server \"%s\" esiste già, impossibile crearlo!"
+#, fuzzy, c-format
+msgid "%s%s: name can not start with \"#\""
+msgstr "%s%s: impossibile accedere al file \"%s\""
+
#, c-format
msgid "%s%s: unable to create server"
msgstr "%s%s: impossibile creare il server"
diff --git a/po/pl.po b/po/pl.po
index 224bee485..588a14c18 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-15 12:10+0200\n"
+"POT-Creation-Date: 2011-04-16 10:41+0200\n"
"PO-Revision-Date: 2011-04-10 17:32+0200\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -148,6 +148,10 @@ msgstr " %s (wtyczka: %s)"
msgid "No bar item defined"
msgstr "Nie zdefiniowano elementów paska"
+#, fuzzy, c-format
+msgid "%sError: name can not start with \"#\""
+msgstr "%sBłąd: nie można utrorzyć pliku \"%s\""
+
#, c-format
msgid "%sNot enough memory"
msgstr "%sZa mało pamięci"
@@ -3602,6 +3606,10 @@ msgstr "Nie znaleziono serwera z \"%s\""
msgid "%s%s: server \"%s\" already exists, can't create it!"
msgstr "%s%s: serwer \"%s\" już istnieje, nie mogę go utworzyć!"
+#, fuzzy, c-format
+msgid "%s%s: name can not start with \"#\""
+msgstr "%s%s: nie można uzyskać dostępu do pliku \"%s\""
+
#, c-format
msgid "%s%s: unable to create server"
msgstr "%s%s: nie można utworzyć serwera"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 1e6697492..3ac9a69df 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-15 12:10+0200\n"
+"POT-Creation-Date: 2011-04-16 10:41+0200\n"
"PO-Revision-Date: 2011-04-10 11:22+0200\n"
"Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -147,6 +147,10 @@ msgstr " %s (plugin: %s)"
msgid "No bar item defined"
msgstr "Nenhum item da barra definido"
+#, fuzzy, c-format
+msgid "%sError: name can not start with \"#\""
+msgstr "Erro: não foi possível criar o diretório \"%s\"\n"
+
#, c-format
msgid "%sNot enough memory"
msgstr "%sMemória insuficiente"
@@ -3433,6 +3437,10 @@ msgid "%s%s: server \"%s\" already exists, can't create it!"
msgstr ""
#, c-format
+msgid "%s%s: name can not start with \"#\""
+msgstr ""
+
+#, c-format
msgid "%s%s: unable to create server"
msgstr ""
diff --git a/po/ru.po b/po/ru.po
index 349b01fc2..60a232aad 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-15 12:10+0200\n"
+"POT-Creation-Date: 2011-04-16 10:41+0200\n"
"PO-Revision-Date: 2011-04-10 17:33+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -151,6 +151,10 @@ msgid "No bar item defined"
msgstr "Сокращения не заданы.\n"
#, fuzzy, c-format
+msgid "%sError: name can not start with \"#\""
+msgstr "%s не могу создать файл \"%s\"\n"
+
+#, fuzzy, c-format
msgid "%sNot enough memory"
msgstr "Недостаточно памяти для новой строчки\n"
@@ -3314,6 +3318,10 @@ msgid "%s%s: server \"%s\" already exists, can't create it!"
msgstr "%s сервер \"%s\" уже существует, не могу создать его!\n"
#, fuzzy, c-format
+msgid "%s%s: name can not start with \"#\""
+msgstr "%s нет доступа к файлу \"%s\"\n"
+
+#, fuzzy, c-format
msgid "%s%s: unable to create server"
msgstr "%s не могу создать сервер\n"
diff --git a/po/weechat.pot b/po/weechat.pot
index d644cd450..ede8bb004 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-15 12:10+0200\n"
+"POT-Creation-Date: 2011-04-16 10:41+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -112,6 +112,10 @@ msgid "No bar item defined"
msgstr ""
#, c-format
+msgid "%sError: name can not start with \"#\""
+msgstr ""
+
+#, c-format
msgid "%sNot enough memory"
msgstr ""
@@ -2902,6 +2906,10 @@ msgid "%s%s: server \"%s\" already exists, can't create it!"
msgstr ""
#, c-format
+msgid "%s%s: name can not start with \"#\""
+msgstr ""
+
+#, c-format
msgid "%s%s: unable to create server"
msgstr ""
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index e11dd9a49..fb3af2d2a 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -203,6 +203,13 @@ COMMAND_CALLBACK(bar)
if (string_strcasecmp (argv[1], "add") == 0)
{
COMMAND_MIN_ARGS(8, "bar add");
+ if (argv[2][0] == '#')
+ {
+ gui_chat_printf (NULL,
+ _("%sError: name can not start with \"#\""),
+ gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
+ return WEECHAT_RC_ERROR;
+ }
pos_condition = strchr (argv[3], ',');
if (pos_condition)
{
@@ -1380,6 +1387,13 @@ COMMAND_CALLBACK(filter)
argv[2]);
return WEECHAT_RC_ERROR;
}
+ if (argv[2][0] == '#')
+ {
+ gui_chat_printf (NULL,
+ _("%sError: name can not start with \"#\""),
+ gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
+ return WEECHAT_RC_ERROR;
+ }
if ((strcmp (argv[4], "*") == 0) && (strcmp (argv_eol[5], "*") == 0))
{
gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
@@ -3210,6 +3224,13 @@ COMMAND_CALLBACK(proxy)
if (string_strcasecmp (argv[1], "add") == 0)
{
COMMAND_MIN_ARGS(6, "proxy add");
+ if (argv[2][0] == '#')
+ {
+ gui_chat_printf (NULL,
+ _("%sError: name can not start with \"#\""),
+ gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
+ return WEECHAT_RC_ERROR;
+ }
type = proxy_search_type (argv[3]);
if (type < 0)
{
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index 1523daa9b..aff76d9da 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -3629,6 +3629,13 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
argv[2]);
return WEECHAT_RC_OK;
}
+ if (argv[2][0] == '#')
+ {
+ weechat_printf (NULL,
+ _("%s%s: name can not start with \"#\""),
+ weechat_prefix ("error"), IRC_PLUGIN_NAME);
+ return WEECHAT_RC_OK;
+ }
new_server = irc_server_alloc (argv[2]);
if (!new_server)