diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-01-22 09:26:11 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-01-22 09:26:11 +0100 |
commit | 0e3bec6d2ec6ea3eec5c0916e9f124835eea4b9f (patch) | |
tree | 496a087b021e8e1580770679f058f021d7d51b38 /src/plugins | |
parent | 1edabb98f5b95a5df924ea04583e39af07f1423d (diff) | |
download | weechat-0e3bec6d2ec6ea3eec5c0916e9f124835eea4b9f.zip |
scripts: do now allow empty script name in function "register"
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/plugin-script.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/plugin-script.c b/src/plugins/plugin-script.c index c3b2b4a25..169172f07 100644 --- a/src/plugins/plugin-script.c +++ b/src/plugins/plugin-script.c @@ -550,11 +550,11 @@ plugin_script_add (struct t_weechat_plugin *weechat_plugin, { struct t_plugin_script *new_script; - if (strchr (name, ' ')) + if (!name[0] || strchr (name, ' ')) { weechat_printf (NULL, - _("%s: error loading script \"%s\" (bad name, spaces " - "are forbidden)"), + _("%s: error loading script \"%s\" (spaces or empty name " + "not allowed)"), weechat_plugin->name, name); return NULL; } |