From 202b4d82c0b233a891e9e1a303833c15ae86e1d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 12 Jan 2023 07:38:01 +0100 Subject: plugins: set priority in calls to weechat_config_new (issue #1872) --- src/plugins/script/script-config.c | 5 +++-- src/plugins/script/script-config.h | 1 + src/plugins/script/script.c | 2 +- src/plugins/script/script.h | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/plugins/script') diff --git a/src/plugins/script/script-config.c b/src/plugins/script/script-config.c index f73ad1b35..ea9e9290f 100644 --- a/src/plugins/script/script-config.c +++ b/src/plugins/script/script-config.c @@ -420,8 +420,9 @@ script_config_init () { struct t_config_section *ptr_section; - script_config_file = weechat_config_new (SCRIPT_CONFIG_NAME, - &script_config_reload, NULL, NULL); + script_config_file = weechat_config_new ( + SCRIPT_CONFIG_PRIO_NAME, + &script_config_reload, NULL, NULL); if (!script_config_file) return 0; diff --git a/src/plugins/script/script-config.h b/src/plugins/script/script-config.h index 1211158dd..11f405744 100644 --- a/src/plugins/script/script-config.h +++ b/src/plugins/script/script-config.h @@ -21,6 +21,7 @@ #define WEECHAT_PLUGIN_SCRIPT_CONFIG_H #define SCRIPT_CONFIG_NAME "script" +#define SCRIPT_CONFIG_PRIO_NAME (TO_STR(SCRIPT_PLUGIN_PRIORITY) "|" SCRIPT_CONFIG_NAME) struct t_script_repo; diff --git a/src/plugins/script/script.c b/src/plugins/script/script.c index 1d33afa87..95a946f10 100644 --- a/src/plugins/script/script.c +++ b/src/plugins/script/script.c @@ -42,7 +42,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Script manager")); WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE); -WEECHAT_PLUGIN_PRIORITY(3000); +WEECHAT_PLUGIN_PRIORITY(SCRIPT_PLUGIN_PRIORITY); struct t_weechat_plugin *weechat_script_plugin = NULL; diff --git a/src/plugins/script/script.h b/src/plugins/script/script.h index edb0deba7..60b74b3e7 100644 --- a/src/plugins/script/script.h +++ b/src/plugins/script/script.h @@ -22,6 +22,7 @@ #define weechat_plugin weechat_script_plugin #define SCRIPT_PLUGIN_NAME "script" +#define SCRIPT_PLUGIN_PRIORITY 3000 #define SCRIPT_NUM_LANGUAGES 8 -- cgit v1.2.3