scripts: ignore call to "register" (with a warning) if script is already registered
This commit is contained in:
parent
e25909878e
commit
529d12c1db
@ -21,6 +21,8 @@ Version 0.3.9 (under dev!)
|
||||
* irc: reallow names beginning with "#" for servers
|
||||
* lua: fix crash when unloading a script without pointer to interpreter
|
||||
* python: fix crash when unloading a script without pointer to interpreter
|
||||
* scripts: ignore call to "register" (with a warning) if script is already
|
||||
registered
|
||||
|
||||
Version 0.3.8 (2012-06-03)
|
||||
--------------------------
|
||||
|
6
po/cs.po
6
po/cs.po
@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.9-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2012-06-10 09:48+0200\n"
|
||||
"POT-Creation-Date: 2012-06-10 22:58+0200\n"
|
||||
"PO-Revision-Date: 2012-06-03 09:49+0200\n"
|
||||
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -7695,6 +7695,10 @@ msgstr ""
|
||||
"jméno rmodifikátoru (může začínat nebo končit \"*\" jako zástupným znakem) "
|
||||
"(volitelné)"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s%s: script \"%s\" already registered (register ignored)"
|
||||
msgstr "%s%s: server \"%s\" již existuje, nemohu jej vytvořít!"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%s: unable to register script \"%s\" (another script already exists with "
|
||||
|
8
po/de.po
8
po/de.po
@ -23,7 +23,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.9-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2012-06-10 09:48+0200\n"
|
||||
"POT-Creation-Date: 2012-06-10 22:58+0200\n"
|
||||
"PO-Revision-Date: 2012-06-03 09:49+0200\n"
|
||||
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
|
||||
"Language-Team: German <weechatter@arcor.de>\n"
|
||||
@ -8226,6 +8226,12 @@ msgstr ""
|
||||
"rmodifier Name (darf mit einem \"*\" als Platzhalter beginnen oder enden) "
|
||||
"(optional)"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s%s: script \"%s\" already registered (register ignored)"
|
||||
msgstr ""
|
||||
"%s%s: Der Server \"%s\" existiert bereits und kann daher nicht angelegt "
|
||||
"werden!"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%s: unable to register script \"%s\" (another script already exists with "
|
||||
|
6
po/es.po
6
po/es.po
@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.9-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2012-06-10 09:48+0200\n"
|
||||
"POT-Creation-Date: 2012-06-10 22:58+0200\n"
|
||||
"PO-Revision-Date: 2012-06-03 09:49+0200\n"
|
||||
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -7964,6 +7964,10 @@ msgstr ""
|
||||
"nombre del modificador regular (puede empezar o terminar con \"*\" como "
|
||||
"comodín) (opcional)"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s%s: script \"%s\" already registered (register ignored)"
|
||||
msgstr "%s%s: el servidor \"%s\" ya existe, ¡no se puede crear!"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%s: unable to register script \"%s\" (another script already exists with "
|
||||
|
8
po/fr.po
8
po/fr.po
@ -21,8 +21,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.9-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2012-06-10 09:48+0200\n"
|
||||
"PO-Revision-Date: 2012-06-10 09:31+0200\n"
|
||||
"POT-Creation-Date: 2012-06-10 22:58+0200\n"
|
||||
"PO-Revision-Date: 2012-06-10 23:00+0200\n"
|
||||
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: French\n"
|
||||
@ -8011,6 +8011,10 @@ msgstr ""
|
||||
"nom du rmodifier (peut démarrer ou se terminer par \"*\" comme caractère "
|
||||
"joker) (optionnel)"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: script \"%s\" already registered (register ignored)"
|
||||
msgstr "%s%s: script \"%s\" déjà enregistré (register ignoré)"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%s: unable to register script \"%s\" (another script already exists with "
|
||||
|
6
po/hu.po
6
po/hu.po
@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.9-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2012-06-10 09:48+0200\n"
|
||||
"POT-Creation-Date: 2012-06-10 22:58+0200\n"
|
||||
"PO-Revision-Date: 2012-06-03 09:49+0200\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -7195,6 +7195,10 @@ msgstr "Beállítások mentése a lemezre\n"
|
||||
msgid "rmodifier name (can start or end with \"*\" as joker) (optional)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s%s: script \"%s\" already registered (register ignored)"
|
||||
msgstr "%s a \"%s\" szerver már létezik, nem hozhatja létre!\n"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%s: unable to register script \"%s\" (another script already exists with "
|
||||
|
6
po/it.po
6
po/it.po
@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.9-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2012-06-10 09:48+0200\n"
|
||||
"POT-Creation-Date: 2012-06-10 22:58+0200\n"
|
||||
"PO-Revision-Date: 2012-06-03 09:49+0200\n"
|
||||
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -7945,6 +7945,10 @@ msgstr ""
|
||||
"nome rmodifier (può iniziare o terminare con \"*\" come carattere jolly) "
|
||||
"(opzionale)"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s%s: script \"%s\" already registered (register ignored)"
|
||||
msgstr "%s%s: il server \"%s\" esiste già, impossibile crearlo!"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%s: unable to register script \"%s\" (another script already exists with "
|
||||
|
6
po/ja.po
6
po/ja.po
@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.9-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2012-06-10 09:48+0200\n"
|
||||
"POT-Creation-Date: 2012-06-10 22:58+0200\n"
|
||||
"PO-Revision-Date: 2012-06-03 09:49+0200\n"
|
||||
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
|
||||
"Language-Team: Japanese <https://github.com/l/WeeChat>\n"
|
||||
@ -7746,6 +7746,10 @@ msgstr "rmodifier ポインタ (オプション)"
|
||||
msgid "rmodifier name (can start or end with \"*\" as joker) (optional)"
|
||||
msgstr "rmodifier 名 (ジョーカーとして \"*\" で始めるか終われる) (オプション)"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s%s: script \"%s\" already registered (register ignored)"
|
||||
msgstr "%s%s: サーバ \"%s\" は既に存在しており、作成できません"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%s: unable to register script \"%s\" (another script already exists with "
|
||||
|
6
po/pl.po
6
po/pl.po
@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.9-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2012-06-10 09:48+0200\n"
|
||||
"POT-Creation-Date: 2012-06-10 22:58+0200\n"
|
||||
"PO-Revision-Date: 2012-06-03 09:49+0200\n"
|
||||
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -7885,6 +7885,10 @@ msgstr "wskaźnik rmodifier (opcjonalny)"
|
||||
msgid "rmodifier name (can start or end with \"*\" as joker) (optional)"
|
||||
msgstr "nazwa rmodifier (może się zaczynać lub kończyć \"*\") (opcjonalne)"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s%s: script \"%s\" already registered (register ignored)"
|
||||
msgstr "%s%s: serwer \"%s\" już istnieje, nie mogę go utworzyć!"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%s: unable to register script \"%s\" (another script already exists with "
|
||||
|
@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.9-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2012-06-10 09:48+0200\n"
|
||||
"POT-Creation-Date: 2012-06-10 22:58+0200\n"
|
||||
"PO-Revision-Date: 2012-06-03 09:49+0200\n"
|
||||
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -7326,6 +7326,10 @@ msgstr ""
|
||||
"nome do rmodifier (pode começar ou terminar com \"*\" como um coringa) "
|
||||
"(opcional)"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: script \"%s\" already registered (register ignored)"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%s: unable to register script \"%s\" (another script already exists with "
|
||||
|
6
po/ru.po
6
po/ru.po
@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.9-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2012-06-10 09:48+0200\n"
|
||||
"POT-Creation-Date: 2012-06-10 22:58+0200\n"
|
||||
"PO-Revision-Date: 2012-06-03 09:49+0200\n"
|
||||
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -7217,6 +7217,10 @@ msgstr "Сохраняю конфигурацию\n"
|
||||
msgid "rmodifier name (can start or end with \"*\" as joker) (optional)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s%s: script \"%s\" already registered (register ignored)"
|
||||
msgstr "%s сервер \"%s\" уже существует, не могу создать его!\n"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%s: unable to register script \"%s\" (another script already exists with "
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2012-06-10 09:48+0200\n"
|
||||
"POT-Creation-Date: 2012-06-10 22:58+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"
|
||||
@ -6313,6 +6313,10 @@ msgstr ""
|
||||
msgid "rmodifier name (can start or end with \"*\" as joker) (optional)"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: script \"%s\" already registered (register ignored)"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%s: unable to register script \"%s\" (another script already exists with "
|
||||
|
@ -87,6 +87,16 @@ weechat_guile_api_register (SCM name, SCM author, SCM version, SCM license,
|
||||
SCM description, SCM shutdown_func, SCM charset)
|
||||
{
|
||||
API_FUNC(0, "register", API_RETURN_ERROR);
|
||||
if (guile_registered_script)
|
||||
{
|
||||
/* script already registered */
|
||||
weechat_printf (NULL,
|
||||
weechat_gettext ("%s%s: script \"%s\" already "
|
||||
"registered (register ignored)"),
|
||||
weechat_prefix ("error"), GUILE_PLUGIN_NAME,
|
||||
guile_registered_script->name);
|
||||
API_RETURN_ERROR;
|
||||
}
|
||||
guile_current_script = NULL;
|
||||
guile_registered_script = NULL;
|
||||
if (!scm_is_string (name) || !scm_is_string (author)
|
||||
@ -98,7 +108,7 @@ weechat_guile_api_register (SCM name, SCM author, SCM version, SCM license,
|
||||
if (script_search (weechat_guile_plugin, guile_scripts,
|
||||
scm_i_string_chars (name)))
|
||||
{
|
||||
/* error: another scripts already exists with this name! */
|
||||
/* another script already exists with same name */
|
||||
weechat_printf (NULL,
|
||||
weechat_gettext ("%s%s: unable to register script "
|
||||
"\"%s\" (another script already "
|
||||
|
@ -94,6 +94,16 @@ weechat_lua_api_register (lua_State *L)
|
||||
const char *shutdown_func, *charset;
|
||||
|
||||
API_FUNC(0, "register", API_RETURN_ERROR);
|
||||
if (lua_registered_script)
|
||||
{
|
||||
/* script already registered */
|
||||
weechat_printf (NULL,
|
||||
weechat_gettext ("%s%s: script \"%s\" already "
|
||||
"registered (register ignored)"),
|
||||
weechat_prefix ("error"), LUA_PLUGIN_NAME,
|
||||
lua_registered_script->name);
|
||||
API_RETURN_ERROR;
|
||||
}
|
||||
lua_current_script = NULL;
|
||||
lua_registered_script = NULL;
|
||||
if (lua_gettop (lua_current_interpreter) < 7)
|
||||
@ -109,6 +119,7 @@ weechat_lua_api_register (lua_State *L)
|
||||
|
||||
if (script_search (weechat_lua_plugin, lua_scripts, name))
|
||||
{
|
||||
/* another script already exists with same name */
|
||||
weechat_printf (NULL,
|
||||
weechat_gettext ("%s%s: unable to register script "
|
||||
"\"%s\" (another script already "
|
||||
|
@ -107,6 +107,16 @@ XS (XS_weechat_api_register)
|
||||
(void) items;
|
||||
|
||||
API_FUNC(0, "register", API_RETURN_ERROR);
|
||||
if (perl_registered_script)
|
||||
{
|
||||
/* script already registered */
|
||||
weechat_printf (NULL,
|
||||
weechat_gettext ("%s%s: script \"%s\" already "
|
||||
"registered (register ignored)"),
|
||||
weechat_prefix ("error"), PERL_PLUGIN_NAME,
|
||||
perl_registered_script->name);
|
||||
API_RETURN_ERROR;
|
||||
}
|
||||
perl_current_script = NULL;
|
||||
perl_registered_script = NULL;
|
||||
|
||||
@ -123,7 +133,7 @@ XS (XS_weechat_api_register)
|
||||
|
||||
if (script_search (weechat_perl_plugin, perl_scripts, name))
|
||||
{
|
||||
/* error: another script already exists with this name! */
|
||||
/* another script already exists with same name */
|
||||
weechat_printf (NULL,
|
||||
weechat_gettext ("%s%s: unable to register script "
|
||||
"\"%s\" (another script already "
|
||||
|
@ -90,6 +90,16 @@ weechat_python_api_register (PyObject *self, PyObject *args)
|
||||
char *charset;
|
||||
|
||||
API_FUNC(0, "register", API_RETURN_ERROR);
|
||||
if (python_registered_script)
|
||||
{
|
||||
/* script already registered */
|
||||
weechat_printf (NULL,
|
||||
weechat_gettext ("%s%s: script \"%s\" already "
|
||||
"registered (register ignored)"),
|
||||
weechat_prefix ("error"), PYTHON_PLUGIN_NAME,
|
||||
python_registered_script->name);
|
||||
API_RETURN_ERROR;
|
||||
}
|
||||
python_current_script = NULL;
|
||||
python_registered_script = NULL;
|
||||
name = NULL;
|
||||
@ -105,7 +115,7 @@ weechat_python_api_register (PyObject *self, PyObject *args)
|
||||
|
||||
if (script_search (weechat_python_plugin, python_scripts, name))
|
||||
{
|
||||
/* error: another scripts already exists with this name! */
|
||||
/* another script already exists with same name */
|
||||
weechat_printf (NULL,
|
||||
weechat_gettext ("%s%s: unable to register script "
|
||||
"\"%s\" (another script already "
|
||||
|
@ -91,6 +91,16 @@ weechat_ruby_api_register (VALUE class, VALUE name, VALUE author,
|
||||
char *c_shutdown_func, *c_charset;
|
||||
|
||||
API_FUNC(0, "register", API_RETURN_ERROR);
|
||||
if (ruby_registered_script)
|
||||
{
|
||||
/* script already registered */
|
||||
weechat_printf (NULL,
|
||||
weechat_gettext ("%s%s: script \"%s\" already "
|
||||
"registered (register ignored)"),
|
||||
weechat_prefix ("error"), RUBY_PLUGIN_NAME,
|
||||
ruby_registered_script->name);
|
||||
API_RETURN_ERROR;
|
||||
}
|
||||
ruby_current_script = NULL;
|
||||
ruby_registered_script = NULL;
|
||||
if (NIL_P (name) || NIL_P (author) || NIL_P (version)
|
||||
@ -116,7 +126,7 @@ weechat_ruby_api_register (VALUE class, VALUE name, VALUE author,
|
||||
|
||||
if (script_search (weechat_ruby_plugin, ruby_scripts, c_name))
|
||||
{
|
||||
/* error: another scripts already exists with this name! */
|
||||
/* another script already exists with same name */
|
||||
weechat_printf (NULL,
|
||||
weechat_gettext ("%s%s: unable to register script "
|
||||
"\"%s\" (another script already "
|
||||
|
@ -218,6 +218,16 @@ weechat_tcl_api_register (ClientData clientData, Tcl_Interp *interp, int objc,
|
||||
int i;
|
||||
|
||||
API_FUNC(0, "register", API_RETURN_ERROR);
|
||||
if (tcl_registered_script)
|
||||
{
|
||||
/* script already registered */
|
||||
weechat_printf (NULL,
|
||||
weechat_gettext ("%s%s: script \"%s\" already "
|
||||
"registered (register ignored)"),
|
||||
weechat_prefix ("error"), TCL_PLUGIN_NAME,
|
||||
tcl_registered_script->name);
|
||||
API_RETURN_ERROR;
|
||||
}
|
||||
tcl_current_script = NULL;
|
||||
tcl_registered_script = NULL;
|
||||
|
||||
@ -234,7 +244,7 @@ weechat_tcl_api_register (ClientData clientData, Tcl_Interp *interp, int objc,
|
||||
|
||||
if (script_search (weechat_tcl_plugin, tcl_scripts, name))
|
||||
{
|
||||
/* error: another script already exists with this name! */
|
||||
/* another script already exists with same name */
|
||||
weechat_printf (NULL,
|
||||
weechat_gettext ("%s%s: unable to register script "
|
||||
"\"%s\" (another script already "
|
||||
|
Loading…
x
Reference in New Issue
Block a user