summaryrefslogtreecommitdiff
path: root/src/plugins/plugin-script-config.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-01-12 07:38:01 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-01-28 15:13:34 +0100
commit202b4d82c0b233a891e9e1a303833c15ae86e1d4 (patch)
tree74d6313c5ae93957adba3cd4f7d4f615d533d0c3 /src/plugins/plugin-script-config.c
parent9174ec979b4cdd7d06f973c096636a833cbb0188 (diff)
downloadweechat-202b4d82c0b233a891e9e1a303833c15ae86e1d4.zip
plugins: set priority in calls to weechat_config_new (issue #1872)
Diffstat (limited to 'src/plugins/plugin-script-config.c')
-rw-r--r--src/plugins/plugin-script-config.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/plugin-script-config.c b/src/plugins/plugin-script-config.c
index 599053d68..5893c87ed 100644
--- a/src/plugins/plugin-script-config.c
+++ b/src/plugins/plugin-script-config.c
@@ -39,8 +39,14 @@ plugin_script_config_init (struct t_weechat_plugin *weechat_plugin,
struct t_plugin_script_data *plugin_data)
{
struct t_config_section *ptr_section;
+ char str_prio_name[PATH_MAX];
- *(plugin_data->config_file) = weechat_config_new (weechat_plugin->name,
+ snprintf (str_prio_name, sizeof (str_prio_name),
+ "%d|%s",
+ weechat_plugin->priority,
+ weechat_plugin->name);
+
+ *(plugin_data->config_file) = weechat_config_new (str_prio_name,
NULL, NULL, NULL);
if (!(*plugin_data->config_file))
return 0;