diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | po/cs.po | 6 | ||||
-rw-r--r-- | po/de.po | 8 | ||||
-rw-r--r-- | po/es.po | 6 | ||||
-rw-r--r-- | po/fr.po | 8 | ||||
-rw-r--r-- | po/hu.po | 6 | ||||
-rw-r--r-- | po/it.po | 6 | ||||
-rw-r--r-- | po/ja.po | 6 | ||||
-rw-r--r-- | po/pl.po | 6 | ||||
-rw-r--r-- | po/pt_BR.po | 6 | ||||
-rw-r--r-- | po/ru.po | 6 | ||||
-rw-r--r-- | po/weechat.pot | 6 | ||||
-rw-r--r-- | src/plugins/scripts/guile/weechat-guile-api.c | 12 | ||||
-rw-r--r-- | src/plugins/scripts/lua/weechat-lua-api.c | 11 | ||||
-rw-r--r-- | src/plugins/scripts/perl/weechat-perl-api.c | 12 | ||||
-rw-r--r-- | src/plugins/scripts/python/weechat-python-api.c | 12 | ||||
-rw-r--r-- | src/plugins/scripts/ruby/weechat-ruby-api.c | 12 | ||||
-rw-r--r-- | src/plugins/scripts/tcl/weechat-tcl-api.c | 12 |
18 files changed, 126 insertions, 17 deletions
@@ -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) -------------------------- @@ -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 " @@ -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 " @@ -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 " @@ -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" @@ -8012,6 +8012,10 @@ msgstr "" "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 " "this name)" @@ -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 " @@ -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 " @@ -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 " @@ -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 " diff --git a/po/pt_BR.po b/po/pt_BR.po index 553d57e3e..afc18b7a5 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.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: Sergio Durigan Junior <sergiosdj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7327,6 +7327,10 @@ msgstr "" "(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 " "this name)" @@ -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 " diff --git a/po/weechat.pot b/po/weechat.pot index 1aacbcf99..366ee9816 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: 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" @@ -6314,6 +6314,10 @@ 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 " "this name)" diff --git a/src/plugins/scripts/guile/weechat-guile-api.c b/src/plugins/scripts/guile/weechat-guile-api.c index 95b309b08..fe5e3c49e 100644 --- a/src/plugins/scripts/guile/weechat-guile-api.c +++ b/src/plugins/scripts/guile/weechat-guile-api.c @@ -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 " diff --git a/src/plugins/scripts/lua/weechat-lua-api.c b/src/plugins/scripts/lua/weechat-lua-api.c index 29668aa11..85a91076b 100644 --- a/src/plugins/scripts/lua/weechat-lua-api.c +++ b/src/plugins/scripts/lua/weechat-lua-api.c @@ -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 " diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c index c2f7a8162..ccd1a6a2d 100644 --- a/src/plugins/scripts/perl/weechat-perl-api.c +++ b/src/plugins/scripts/perl/weechat-perl-api.c @@ -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 " diff --git a/src/plugins/scripts/python/weechat-python-api.c b/src/plugins/scripts/python/weechat-python-api.c index bc1076fb0..a382ef062 100644 --- a/src/plugins/scripts/python/weechat-python-api.c +++ b/src/plugins/scripts/python/weechat-python-api.c @@ -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 " diff --git a/src/plugins/scripts/ruby/weechat-ruby-api.c b/src/plugins/scripts/ruby/weechat-ruby-api.c index 1bc01b1fd..3cef992ae 100644 --- a/src/plugins/scripts/ruby/weechat-ruby-api.c +++ b/src/plugins/scripts/ruby/weechat-ruby-api.c @@ -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 " diff --git a/src/plugins/scripts/tcl/weechat-tcl-api.c b/src/plugins/scripts/tcl/weechat-tcl-api.c index c282242e4..6762516b5 100644 --- a/src/plugins/scripts/tcl/weechat-tcl-api.c +++ b/src/plugins/scripts/tcl/weechat-tcl-api.c @@ -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 " |