1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 20:36:38 +02:00

core, plugins: make commands, hook command_run, completions and aliases case sensitive (issue #1872)

This commit is contained in:
Sébastien Helleu
2023-01-15 10:54:56 +01:00
parent 1de735b779
commit f0415c8ec3
41 changed files with 711 additions and 721 deletions
+16 -16
View File
@@ -597,30 +597,30 @@ weechat_js_command_cb (const void *pointer, void *data,
}
else if (argc == 2)
{
if (weechat_strcasecmp (argv[1], "list") == 0)
if (weechat_strcmp (argv[1], "list") == 0)
{
plugin_script_display_list (weechat_js_plugin, js_scripts,
NULL, 0);
}
else if (weechat_strcasecmp (argv[1], "listfull") == 0)
else if (weechat_strcmp (argv[1], "listfull") == 0)
{
plugin_script_display_list (weechat_js_plugin, js_scripts,
NULL, 1);
}
else if (weechat_strcasecmp (argv[1], "autoload") == 0)
else if (weechat_strcmp (argv[1], "autoload") == 0)
{
plugin_script_auto_load (weechat_js_plugin, &weechat_js_load_cb);
}
else if (weechat_strcasecmp (argv[1], "reload") == 0)
else if (weechat_strcmp (argv[1], "reload") == 0)
{
weechat_js_unload_all ();
plugin_script_auto_load (weechat_js_plugin, &weechat_js_load_cb);
}
else if (weechat_strcasecmp(argv[1], "unload") == 0)
else if (weechat_strcmp(argv[1], "unload") == 0)
{
weechat_js_unload_all ();
}
else if (weechat_strcasecmp (argv[1], "version") == 0)
else if (weechat_strcmp (argv[1], "version") == 0)
{
plugin_script_display_interpreter (weechat_js_plugin, 0);
}
@@ -629,19 +629,19 @@ weechat_js_command_cb (const void *pointer, void *data,
}
else
{
if (weechat_strcasecmp (argv[1], "list") == 0)
if (weechat_strcmp (argv[1], "list") == 0)
{
plugin_script_display_list (weechat_js_plugin, js_scripts,
argv_eol[2], 0);
}
else if (weechat_strcasecmp (argv[1], "listfull") == 0)
else if (weechat_strcmp (argv[1], "listfull") == 0)
{
plugin_script_display_list (weechat_js_plugin, js_scripts,
argv_eol[2], 1);
}
else if ((weechat_strcasecmp (argv[1], "load") == 0)
|| (weechat_strcasecmp (argv[1], "reload") == 0)
|| (weechat_strcasecmp (argv[1], "unload") == 0))
else if ((weechat_strcmp (argv[1], "load") == 0)
|| (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0))
{
ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0)
@@ -653,7 +653,7 @@ weechat_js_command_cb (const void *pointer, void *data,
ptr_name++;
}
}
if (weechat_strcasecmp (argv[1], "load") == 0)
if (weechat_strcmp (argv[1], "load") == 0)
{
/* load javascript script */
path_script = plugin_script_search_path (weechat_js_plugin,
@@ -663,19 +663,19 @@ weechat_js_command_cb (const void *pointer, void *data,
if (path_script)
free (path_script);
}
else if (weechat_strcasecmp (argv[1], "reload") == 0)
else if (weechat_strcmp (argv[1], "reload") == 0)
{
/* reload one javascript script */
weechat_js_reload_name (ptr_name);
}
else if (weechat_strcasecmp (argv[1], "unload") == 0)
else if (weechat_strcmp (argv[1], "unload") == 0)
{
/* unload javascript script */
weechat_js_unload_name (ptr_name);
}
js_quiet = 0;
}
else if (weechat_strcasecmp (argv[1], "eval") == 0)
else if (weechat_strcmp (argv[1], "eval") == 0)
{
send_to_buffer_as_input = 0;
exec_commands = 0;
@@ -820,7 +820,7 @@ weechat_js_signal_debug_dump_cb (const void *pointer, void *data,
(void) type_data;
if (!signal_data
|| (weechat_strcasecmp ((char *)signal_data, JS_PLUGIN_NAME) == 0))
|| (weechat_strcmp ((char *)signal_data, JS_PLUGIN_NAME) == 0))
{
plugin_script_print_log (weechat_js_plugin, js_scripts);
}