diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-01-15 20:29:45 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-01-28 15:13:57 +0100 |
commit | 5434f4f9694965ca6d07e6f26be95d2e932d1097 (patch) | |
tree | 888b202a6e9b5bf3ffc0660ca1058f88d0a192f5 | |
parent | 4b5897f1103f0de27b70f05909424c4354e2d848 (diff) | |
download | weechat-5434f4f9694965ca6d07e6f26be95d2e932d1097.zip |
core, plugins: make plugin names case sensitive (issue #1872)
-rw-r--r-- | src/core/wee-command.c | 2 | ||||
-rw-r--r-- | src/gui/gui-layout.c | 4 | ||||
-rw-r--r-- | src/plugins/plugin-api-info.c | 2 | ||||
-rw-r--r-- | src/plugins/plugin.c | 12 | ||||
-rw-r--r-- | src/plugins/xfer/xfer.c | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 28b6926e5..cbdb79456 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -4810,7 +4810,7 @@ command_plugin_list (const char *name, int full) for (ptr_plugin = weechat_plugins; ptr_plugin; ptr_plugin = ptr_plugin->next_plugin) { - if (!name || (string_strcasestr (ptr_plugin->name, name))) + if (!name || (strstr (ptr_plugin->name, name))) { plugins_found++; diff --git a/src/gui/gui-layout.c b/src/gui/gui-layout.c index 6ad859cf8..51b12c1d8 100644 --- a/src/gui/gui-layout.c +++ b/src/gui/gui-layout.c @@ -278,8 +278,8 @@ gui_layout_buffer_get_number (struct t_gui_layout *layout, else merge_order++; - if ((string_strcasecmp (ptr_layout_buffer->plugin_name, plugin_name) == 0) - && (string_strcasecmp (ptr_layout_buffer->buffer_name, buffer_name) == 0)) + if ((string_strcmp (ptr_layout_buffer->plugin_name, plugin_name) == 0) + && (string_strcmp (ptr_layout_buffer->buffer_name, buffer_name) == 0)) { *layout_number = ptr_layout_buffer->number; *layout_number_merge_order = merge_order; diff --git a/src/plugins/plugin-api-info.c b/src/plugins/plugin-api-info.c index 6e79aee68..0eb20b473 100644 --- a/src/plugins/plugin-api-info.c +++ b/src/plugins/plugin-api-info.c @@ -1661,7 +1661,7 @@ plugin_api_infolist_plugin_cb (const void *pointer, void *data, ptr_plugin = ptr_plugin->next_plugin) { if (!arguments || !arguments[0] - || string_match (ptr_plugin->name, arguments, 0)) + || string_match (ptr_plugin->name, arguments, 1)) { if (!plugin_add_to_infolist (ptr_infolist, ptr_plugin)) { diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 04f4e001b..964347d26 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -128,7 +128,7 @@ plugin_search (const char *name) for (ptr_plugin = weechat_plugins; ptr_plugin; ptr_plugin = ptr_plugin->next_plugin) { - if (string_strcasecmp (ptr_plugin->name, name) == 0) + if (string_strcmp (ptr_plugin->name, name) == 0) return ptr_plugin; } @@ -172,8 +172,8 @@ plugin_check_extension_allowed (const char *filename) length_ext = strlen (config_plugin_extensions[i]); if (length >= length_ext) { - if (string_strcasecmp (filename + length - length_ext, - config_plugin_extensions[i]) == 0) + if (string_strcmp (filename + length - length_ext, + config_plugin_extensions[i]) == 0) { /* extension allowed */ return 1; @@ -235,8 +235,8 @@ plugin_check_autoload (const char *filename) length_ext = strlen (config_plugin_extensions[i]); if (length >= length_ext) { - if (string_strcasecmp (base_name + length - length_ext, - config_plugin_extensions[i]) == 0) + if (string_strcmp (base_name + length - length_ext, + config_plugin_extensions[i]) == 0) { plugin_name = string_strndup (base_name, length - length_ext); break; @@ -256,7 +256,7 @@ plugin_check_autoload (const char *filename) match = string_match_list (plugin_name, (const char **)plugin_autoload_array, - 0); + 1); free (plugin_name); diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index 6b081d114..e0fccb2ca 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -245,8 +245,8 @@ xfer_search (const char *plugin_name, const char *plugin_id, enum t_xfer_type ty for (ptr_xfer = xfer_list; ptr_xfer; ptr_xfer = ptr_xfer->next_xfer) { - if ((weechat_strcasecmp (ptr_xfer->plugin_name, plugin_name) == 0) - && (weechat_strcasecmp (ptr_xfer->plugin_id, plugin_id) == 0) + if ((weechat_strcmp (ptr_xfer->plugin_name, plugin_name) == 0) + && (weechat_strcmp (ptr_xfer->plugin_id, plugin_id) == 0) && (ptr_xfer->type == type) && (ptr_xfer->status = status) && (ptr_xfer->port == port)) |