summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/javascript/weechat-js.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/javascript/weechat-js.cpp b/src/plugins/javascript/weechat-js.cpp
index 90f815622..d2c2c0dc7 100644
--- a/src/plugins/javascript/weechat-js.cpp
+++ b/src/plugins/javascript/weechat-js.cpp
@@ -553,10 +553,12 @@ weechat_js_command_cb (const void *pointer, void *data,
weechat_js_unload_all ();
plugin_script_auto_load (weechat_js_plugin, &weechat_js_load_cb);
}
- else if (weechat_strcasecmp(argv[1], "unload"))
+ else if (weechat_strcasecmp(argv[1], "unload") == 0)
{
weechat_js_unload_all ();
}
+ else
+ WEECHAT_COMMAND_ERROR;
}
else
{