1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

script: make script names case sensitive (issue #1872)

This commit is contained in:
Sébastien Helleu
2023-01-27 19:42:24 +01:00
parent 375c9f8b1e
commit 3319e6ff6e
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -492,10 +492,13 @@ plugin_script_search (struct t_weechat_plugin *weechat_plugin,
{
struct t_plugin_script *ptr_script;
if (!name)
return NULL;
for (ptr_script = scripts; ptr_script;
ptr_script = ptr_script->next_script)
{
if (weechat_strcasecmp (ptr_script->name, name) == 0)
if (strcmp (ptr_script->name, name) == 0)
return ptr_script;
}
@@ -635,7 +638,7 @@ plugin_script_find_pos (struct t_weechat_plugin *weechat_plugin,
for (ptr_script = scripts; ptr_script; ptr_script = ptr_script->next_script)
{
if (weechat_strcasecmp (script->name, ptr_script->name) < 0)
if (weechat_strcmp (script->name, ptr_script->name) < 0)
return ptr_script;
}
return NULL;
@@ -1754,7 +1757,7 @@ plugin_script_infolist_list_scripts (struct t_weechat_plugin *weechat_plugin,
ptr_script = ptr_script->next_script)
{
if (!arguments || !arguments[0]
|| weechat_string_match (ptr_script->name, arguments, 0))
|| weechat_string_match (ptr_script->name, arguments, 1))
{
if (!plugin_script_add_to_infolist (weechat_plugin,
ptr_infolist, ptr_script))
+1 -1
View File
@@ -71,7 +71,7 @@ script_info_infolist_script_script_cb (const void *pointer, void *data,
{
if (!arguments || !arguments[0]
|| weechat_string_match (ptr_script->name_with_extension,
arguments, 0))
arguments, 1))
{
if (!script_repo_add_to_infolist (ptr_infolist, ptr_script))
{