mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 12:26:40 +02:00
core, plugins: make commands, hook command_run, completions and aliases case sensitive (issue #1872)
This commit is contained in:
@@ -1141,30 +1141,30 @@ weechat_python_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_python_plugin, python_scripts,
|
||||
NULL, 0);
|
||||
}
|
||||
else if (weechat_strcasecmp (argv[1], "listfull") == 0)
|
||||
else if (weechat_strcmp (argv[1], "listfull") == 0)
|
||||
{
|
||||
plugin_script_display_list (weechat_python_plugin, python_scripts,
|
||||
NULL, 1);
|
||||
}
|
||||
else if (weechat_strcasecmp (argv[1], "autoload") == 0)
|
||||
else if (weechat_strcmp (argv[1], "autoload") == 0)
|
||||
{
|
||||
plugin_script_auto_load (weechat_python_plugin, &weechat_python_load_cb);
|
||||
}
|
||||
else if (weechat_strcasecmp (argv[1], "reload") == 0)
|
||||
else if (weechat_strcmp (argv[1], "reload") == 0)
|
||||
{
|
||||
weechat_python_unload_all ();
|
||||
plugin_script_auto_load (weechat_python_plugin, &weechat_python_load_cb);
|
||||
}
|
||||
else if (weechat_strcasecmp (argv[1], "unload") == 0)
|
||||
else if (weechat_strcmp (argv[1], "unload") == 0)
|
||||
{
|
||||
weechat_python_unload_all ();
|
||||
}
|
||||
else if (weechat_strcasecmp (argv[1], "version") == 0)
|
||||
else if (weechat_strcmp (argv[1], "version") == 0)
|
||||
{
|
||||
plugin_script_display_interpreter (weechat_python_plugin, 0);
|
||||
}
|
||||
@@ -1173,19 +1173,19 @@ weechat_python_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_python_plugin, python_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_python_plugin, python_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)
|
||||
@@ -1197,7 +1197,7 @@ weechat_python_command_cb (const void *pointer, void *data,
|
||||
ptr_name++;
|
||||
}
|
||||
}
|
||||
if (weechat_strcasecmp (argv[1], "load") == 0)
|
||||
if (weechat_strcmp (argv[1], "load") == 0)
|
||||
{
|
||||
/* load python script */
|
||||
path_script = plugin_script_search_path (weechat_python_plugin,
|
||||
@@ -1207,19 +1207,19 @@ weechat_python_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 python script */
|
||||
weechat_python_reload_name (ptr_name);
|
||||
}
|
||||
else if (weechat_strcasecmp (argv[1], "unload") == 0)
|
||||
else if (weechat_strcmp (argv[1], "unload") == 0)
|
||||
{
|
||||
/* unload python script */
|
||||
weechat_python_unload_name (ptr_name);
|
||||
}
|
||||
python_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;
|
||||
@@ -1363,7 +1363,7 @@ weechat_python_signal_debug_dump_cb (const void *pointer, void *data,
|
||||
(void) type_data;
|
||||
|
||||
if (!signal_data
|
||||
|| (weechat_strcasecmp ((char *)signal_data, PYTHON_PLUGIN_NAME) == 0))
|
||||
|| (weechat_strcmp ((char *)signal_data, PYTHON_PLUGIN_NAME) == 0))
|
||||
{
|
||||
plugin_script_print_log (weechat_python_plugin, python_scripts);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user