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

core, plugins: make plugin names case sensitive (issue #1872)

This commit is contained in:
Sébastien Helleu
2023-01-15 20:29:45 +01:00
parent 4b5897f110
commit 5434f4f969
5 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -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++;
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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))
{
+6 -6
View File
@@ -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);
+2 -2
View File
@@ -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))