summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/alias/alias-config.c3
-rw-r--r--src/plugins/alias/alias-config.h3
-rw-r--r--src/plugins/alias/alias.c2
-rw-r--r--src/plugins/alias/alias.h3
-rw-r--r--src/plugins/buflist/buflist-config.c2
-rw-r--r--src/plugins/buflist/buflist-config.h1
-rw-r--r--src/plugins/buflist/buflist.c2
-rw-r--r--src/plugins/buflist/buflist.h1
-rw-r--r--src/plugins/charset/CMakeLists.txt2
-rw-r--r--src/plugins/charset/charset.c13
-rw-r--r--src/plugins/charset/charset.h32
-rw-r--r--src/plugins/exec/exec-config.c2
-rw-r--r--src/plugins/exec/exec-config.h1
-rw-r--r--src/plugins/exec/exec.c2
-rw-r--r--src/plugins/exec/exec.h1
-rw-r--r--src/plugins/fifo/fifo-config.c2
-rw-r--r--src/plugins/fifo/fifo-config.h2
-rw-r--r--src/plugins/fifo/fifo.c2
-rw-r--r--src/plugins/fifo/fifo.h1
-rw-r--r--src/plugins/fset/fset-config.c2
-rw-r--r--src/plugins/fset/fset-config.h1
-rw-r--r--src/plugins/fset/fset.c2
-rw-r--r--src/plugins/fset/fset.h1
-rw-r--r--src/plugins/guile/weechat-guile.c2
-rw-r--r--src/plugins/guile/weechat-guile.h1
-rw-r--r--src/plugins/irc/irc-config.c2
-rw-r--r--src/plugins/irc/irc-config.h1
-rw-r--r--src/plugins/irc/irc.c2
-rw-r--r--src/plugins/irc/irc.h1
-rw-r--r--src/plugins/javascript/weechat-js.cpp4
-rw-r--r--src/plugins/javascript/weechat-js.h1
-rw-r--r--src/plugins/logger/logger-config.c2
-rw-r--r--src/plugins/logger/logger-config.h1
-rw-r--r--src/plugins/logger/logger.c2
-rw-r--r--src/plugins/logger/logger.h1
-rw-r--r--src/plugins/lua/weechat-lua.c2
-rw-r--r--src/plugins/lua/weechat-lua.h1
-rw-r--r--src/plugins/perl/weechat-perl.c2
-rw-r--r--src/plugins/perl/weechat-perl.h1
-rw-r--r--src/plugins/php/weechat-php.c2
-rw-r--r--src/plugins/php/weechat-php.h2
-rw-r--r--src/plugins/plugin-config.c2
-rw-r--r--src/plugins/plugin-config.h1
-rw-r--r--src/plugins/plugin-script-config.c8
-rw-r--r--src/plugins/python/weechat-python.c2
-rw-r--r--src/plugins/python/weechat-python.h1
-rw-r--r--src/plugins/relay/relay-config.c2
-rw-r--r--src/plugins/relay/relay-config.h1
-rw-r--r--src/plugins/relay/relay.c2
-rw-r--r--src/plugins/relay/relay.h1
-rw-r--r--src/plugins/ruby/weechat-ruby.c2
-rw-r--r--src/plugins/ruby/weechat-ruby.h1
-rw-r--r--src/plugins/script/script-config.c5
-rw-r--r--src/plugins/script/script-config.h1
-rw-r--r--src/plugins/script/script.c2
-rw-r--r--src/plugins/script/script.h1
-rw-r--r--src/plugins/spell/spell-config.c2
-rw-r--r--src/plugins/spell/spell-config.h2
-rw-r--r--src/plugins/spell/spell.c2
-rw-r--r--src/plugins/spell/spell.h1
-rw-r--r--src/plugins/tcl/weechat-tcl.c2
-rw-r--r--src/plugins/tcl/weechat-tcl.h1
-rw-r--r--src/plugins/trigger/trigger-config.c3
-rw-r--r--src/plugins/trigger/trigger-config.h1
-rw-r--r--src/plugins/trigger/trigger.c2
-rw-r--r--src/plugins/trigger/trigger.h1
-rw-r--r--src/plugins/typing/typing-config.c2
-rw-r--r--src/plugins/typing/typing-config.h1
-rw-r--r--src/plugins/typing/typing.c2
-rw-r--r--src/plugins/typing/typing.h1
-rw-r--r--src/plugins/weechat-plugin.h4
-rw-r--r--src/plugins/xfer/xfer-config.c2
-rw-r--r--src/plugins/xfer/xfer-config.h1
-rw-r--r--src/plugins/xfer/xfer.c2
-rw-r--r--src/plugins/xfer/xfer.h1
75 files changed, 127 insertions, 51 deletions
diff --git a/src/plugins/alias/alias-config.c b/src/plugins/alias/alias-config.c
index a85e53f83..99d95b64b 100644
--- a/src/plugins/alias/alias-config.c
+++ b/src/plugins/alias/alias-config.c
@@ -25,6 +25,7 @@
#include "../weechat-plugin.h"
#include "alias.h"
+#include "alias-config.h"
struct t_config_file *alias_config_file = NULL;
@@ -368,7 +369,7 @@ alias_config_init ()
{
struct t_config_section *ptr_section;
- alias_config_file = weechat_config_new (ALIAS_CONFIG_NAME,
+ alias_config_file = weechat_config_new (ALIAS_CONFIG_PRIO_NAME,
&alias_config_reload, NULL, NULL);
if (!alias_config_file)
return 0;
diff --git a/src/plugins/alias/alias-config.h b/src/plugins/alias/alias-config.h
index fb55cd6cb..77cce9408 100644
--- a/src/plugins/alias/alias-config.h
+++ b/src/plugins/alias/alias-config.h
@@ -20,6 +20,9 @@
#ifndef WEECHAT_PLUGIN_ALIAS_CONFIG_H
#define WEECHAT_PLUGIN_ALIAS_CONFIG_H
+#define ALIAS_CONFIG_NAME "alias"
+#define ALIAS_CONFIG_PRIO_NAME (TO_STR(ALIAS_PLUGIN_PRIORITY) "|" ALIAS_CONFIG_NAME)
+
extern struct t_config_file *alias_config_file;
extern struct t_config_section *alias_config_section_cmd;
extern struct t_config_section *alias_config_section_completion;
diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c
index 77caa1dce..fea7da3c8 100644
--- a/src/plugins/alias/alias.c
+++ b/src/plugins/alias/alias.c
@@ -36,7 +36,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Alias commands"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(11000);
+WEECHAT_PLUGIN_PRIORITY(ALIAS_PLUGIN_PRIORITY);
#define ALIAS_IS_ARG_NUMBER(number) ((number >= '1') && (number <= '9'))
diff --git a/src/plugins/alias/alias.h b/src/plugins/alias/alias.h
index 35205e4a9..8c80b3586 100644
--- a/src/plugins/alias/alias.h
+++ b/src/plugins/alias/alias.h
@@ -22,8 +22,7 @@
#define weechat_plugin weechat_alias_plugin
#define ALIAS_PLUGIN_NAME "alias"
-
-#define ALIAS_CONFIG_NAME "alias"
+#define ALIAS_PLUGIN_PRIORITY 11000
struct t_alias
{
diff --git a/src/plugins/buflist/buflist-config.c b/src/plugins/buflist/buflist-config.c
index 33ea7f0b0..2e63e934f 100644
--- a/src/plugins/buflist/buflist-config.c
+++ b/src/plugins/buflist/buflist-config.c
@@ -469,7 +469,7 @@ buflist_config_init ()
struct t_config_section *ptr_section;
buflist_config_file = weechat_config_new (
- BUFLIST_CONFIG_NAME,
+ BUFLIST_CONFIG_PRIO_NAME,
&buflist_config_reload, NULL, NULL);
if (!buflist_config_file)
return 0;
diff --git a/src/plugins/buflist/buflist-config.h b/src/plugins/buflist/buflist-config.h
index 2f3f696fe..3e9593a2c 100644
--- a/src/plugins/buflist/buflist-config.h
+++ b/src/plugins/buflist/buflist-config.h
@@ -23,6 +23,7 @@
#include "buflist-bar-item.h"
#define BUFLIST_CONFIG_NAME "buflist"
+#define BUFLIST_CONFIG_PRIO_NAME (TO_STR(BUFLIST_PLUGIN_PRIORITY) "|" BUFLIST_CONFIG_NAME)
#define BUFLIST_CONFIG_SIGNALS_REFRESH \
"buffer_opened,buffer_closed,buffer_merged,buffer_unmerged," \
diff --git a/src/plugins/buflist/buflist.c b/src/plugins/buflist/buflist.c
index 1de63b66b..226161e92 100644
--- a/src/plugins/buflist/buflist.c
+++ b/src/plugins/buflist/buflist.c
@@ -38,7 +38,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Buffers list"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(10000);
+WEECHAT_PLUGIN_PRIORITY(BUFLIST_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_buflist_plugin = NULL;
diff --git a/src/plugins/buflist/buflist.h b/src/plugins/buflist/buflist.h
index cb2938dbb..15ed7633e 100644
--- a/src/plugins/buflist/buflist.h
+++ b/src/plugins/buflist/buflist.h
@@ -22,6 +22,7 @@
#define weechat_plugin weechat_buflist_plugin
#define BUFLIST_PLUGIN_NAME "buflist"
+#define BUFLIST_PLUGIN_PRIORITY 10000
#define BUFLIST_BAR_NAME "buflist"
diff --git a/src/plugins/charset/CMakeLists.txt b/src/plugins/charset/CMakeLists.txt
index d3b828a8b..4db0bb144 100644
--- a/src/plugins/charset/CMakeLists.txt
+++ b/src/plugins/charset/CMakeLists.txt
@@ -18,7 +18,7 @@
#
add_library(charset MODULE
- charset.c
+ charset.c charset.h
)
set_target_properties(charset PROPERTIES PREFIX "")
diff --git a/src/plugins/charset/charset.c b/src/plugins/charset/charset.c
index 15b035bee..4c4150931 100644
--- a/src/plugins/charset/charset.c
+++ b/src/plugins/charset/charset.c
@@ -28,21 +28,17 @@
#include <iconv.h>
#include "../weechat-plugin.h"
+#include "charset.h"
-#define CHARSET_PLUGIN_NAME "charset"
-
WEECHAT_PLUGIN_NAME(CHARSET_PLUGIN_NAME);
WEECHAT_PLUGIN_DESCRIPTION(N_("Charset conversions"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(16000);
-
-#define CHARSET_CONFIG_NAME "charset"
+WEECHAT_PLUGIN_PRIORITY(CHARSET_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_charset_plugin = NULL;
-#define weechat_plugin weechat_charset_plugin
struct t_config_file *charset_config_file = NULL;
struct t_config_option *charset_default_decode = NULL;
@@ -201,8 +197,9 @@ charset_config_init ()
{
struct t_config_section *ptr_section;
- charset_config_file = weechat_config_new (CHARSET_CONFIG_NAME,
- &charset_config_reload, NULL, NULL);
+ charset_config_file = weechat_config_new (
+ CHARSET_CONFIG_PRIO_NAME,
+ &charset_config_reload, NULL, NULL);
if (!charset_config_file)
return 0;
diff --git a/src/plugins/charset/charset.h b/src/plugins/charset/charset.h
new file mode 100644
index 000000000..f36d4e640
--- /dev/null
+++ b/src/plugins/charset/charset.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2003-2023 Sébastien Helleu <flashcode@flashtux.org>
+ *
+ * This file is part of WeeChat, the extensible chat client.
+ *
+ * WeeChat is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * WeeChat is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#ifndef WEECHAT_PLUGIN_CHARSET_H
+#define WEECHAT_PLUGIN_CHARSET_H
+
+#define weechat_plugin weechat_charset_plugin
+#define CHARSET_PLUGIN_NAME "charset"
+#define CHARSET_PLUGIN_PRIORITY 16000
+
+#define CHARSET_CONFIG_NAME "charset"
+#define CHARSET_CONFIG_PRIO_NAME (TO_STR(CHARSET_PLUGIN_PRIORITY) "|" CHARSET_CONFIG_NAME)
+
+extern struct t_weechat_plugin *weechat_charset_plugin;
+
+#endif /* WEECHAT_PLUGIN_CHARSET_H */
diff --git a/src/plugins/exec/exec-config.c b/src/plugins/exec/exec-config.c
index f7eeccdf2..6c6ef8783 100644
--- a/src/plugins/exec/exec-config.c
+++ b/src/plugins/exec/exec-config.c
@@ -100,7 +100,7 @@ exec_config_init ()
{
struct t_config_section *ptr_section;
- exec_config_file = weechat_config_new (EXEC_CONFIG_NAME,
+ exec_config_file = weechat_config_new (EXEC_CONFIG_PRIO_NAME,
&exec_config_reload_cb, NULL, NULL);
if (!exec_config_file)
return 0;
diff --git a/src/plugins/exec/exec-config.h b/src/plugins/exec/exec-config.h
index baaa29868..17c905725 100644
--- a/src/plugins/exec/exec-config.h
+++ b/src/plugins/exec/exec-config.h
@@ -21,6 +21,7 @@
#define WEECHAT_PLUGIN_EXEC_CONFIG_H
#define EXEC_CONFIG_NAME "exec"
+#define EXEC_CONFIG_PRIO_NAME (TO_STR(EXEC_PLUGIN_PRIORITY) "|" EXEC_CONFIG_NAME)
extern struct t_config_file *exec_config_file;
diff --git a/src/plugins/exec/exec.c b/src/plugins/exec/exec.c
index f5344a421..da404a080 100644
--- a/src/plugins/exec/exec.c
+++ b/src/plugins/exec/exec.c
@@ -37,7 +37,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Execution of external commands in WeeChat"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(14000);
+WEECHAT_PLUGIN_PRIORITY(EXEC_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_exec_plugin = NULL;
diff --git a/src/plugins/exec/exec.h b/src/plugins/exec/exec.h
index 962189812..2213999ea 100644
--- a/src/plugins/exec/exec.h
+++ b/src/plugins/exec/exec.h
@@ -25,6 +25,7 @@
#define weechat_plugin weechat_exec_plugin
#define EXEC_PLUGIN_NAME "exec"
+#define EXEC_PLUGIN_PRIORITY 14000
#define EXEC_STDOUT 0
#define EXEC_STDERR 1
diff --git a/src/plugins/fifo/fifo-config.c b/src/plugins/fifo/fifo-config.c
index 746867a16..11f03a9e9 100644
--- a/src/plugins/fifo/fifo-config.c
+++ b/src/plugins/fifo/fifo-config.c
@@ -87,7 +87,7 @@ fifo_config_init ()
{
struct t_config_section *ptr_section;
- fifo_config_file = weechat_config_new (FIFO_CONFIG_NAME,
+ fifo_config_file = weechat_config_new (FIFO_CONFIG_PRIO_NAME,
NULL, NULL, NULL);
if (!fifo_config_file)
return 0;
diff --git a/src/plugins/fifo/fifo-config.h b/src/plugins/fifo/fifo-config.h
index 2b3fe475c..68ddf7ea3 100644
--- a/src/plugins/fifo/fifo-config.h
+++ b/src/plugins/fifo/fifo-config.h
@@ -21,7 +21,7 @@
#define WEECHAT_PLUGIN_FIFO_CONFIG_H
#define FIFO_CONFIG_NAME "fifo"
-
+#define FIFO_CONFIG_PRIO_NAME (TO_STR(FIFO_PLUGIN_PRIORITY) "|" FIFO_CONFIG_NAME)
extern struct t_config_option *fifo_config_file_enabled;
extern struct t_config_option *fifo_config_file_path;
diff --git a/src/plugins/fifo/fifo.c b/src/plugins/fifo/fifo.c
index bb6976c64..d7620d584 100644
--- a/src/plugins/fifo/fifo.c
+++ b/src/plugins/fifo/fifo.c
@@ -42,7 +42,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("FIFO pipe for remote control"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(9000);
+WEECHAT_PLUGIN_PRIORITY(FIFO_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_fifo_plugin = NULL;
#define weechat_plugin weechat_fifo_plugin
diff --git a/src/plugins/fifo/fifo.h b/src/plugins/fifo/fifo.h
index ea5485f5b..5110e58cc 100644
--- a/src/plugins/fifo/fifo.h
+++ b/src/plugins/fifo/fifo.h
@@ -22,6 +22,7 @@
#define weechat_plugin weechat_fifo_plugin
#define FIFO_PLUGIN_NAME "fifo"
+#define FIFO_PLUGIN_PRIORITY 9000
extern struct t_weechat_plugin *weechat_fifo_plugin;
extern int fifo_quiet;
diff --git a/src/plugins/fset/fset-config.c b/src/plugins/fset/fset-config.c
index 13de7038e..be6a4e284 100644
--- a/src/plugins/fset/fset-config.c
+++ b/src/plugins/fset/fset-config.c
@@ -365,7 +365,7 @@ fset_config_init ()
{
struct t_config_section *ptr_section;
- fset_config_file = weechat_config_new (FSET_CONFIG_NAME,
+ fset_config_file = weechat_config_new (FSET_CONFIG_PRIO_NAME,
&fset_config_reload, NULL, NULL);
if (!fset_config_file)
return 0;
diff --git a/src/plugins/fset/fset-config.h b/src/plugins/fset/fset-config.h
index 960962a1e..75cf3f16a 100644
--- a/src/plugins/fset/fset-config.h
+++ b/src/plugins/fset/fset-config.h
@@ -21,6 +21,7 @@
#define WEECHAT_PLUGIN_FSET_CONFIG_H
#define FSET_CONFIG_NAME "fset"
+#define FSET_CONFIG_PRIO_NAME (TO_STR(FSET_PLUGIN_PRIORITY) "|" FSET_CONFIG_NAME)
extern struct t_config_file *fset_config_file;
diff --git a/src/plugins/fset/fset.c b/src/plugins/fset/fset.c
index 6b9a15918..7c99bf19a 100644
--- a/src/plugins/fset/fset.c
+++ b/src/plugins/fset/fset.c
@@ -40,7 +40,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Fast set of WeeChat and plugins options"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(2000);
+WEECHAT_PLUGIN_PRIORITY(FSET_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_fset_plugin = NULL;
diff --git a/src/plugins/fset/fset.h b/src/plugins/fset/fset.h
index 6462aa88c..e94a49d9f 100644
--- a/src/plugins/fset/fset.h
+++ b/src/plugins/fset/fset.h
@@ -22,6 +22,7 @@
#define weechat_plugin weechat_fset_plugin
#define FSET_PLUGIN_NAME "fset"
+#define FSET_PLUGIN_PRIORITY 2000
#define FSET_BAR_NAME "fset"
diff --git a/src/plugins/guile/weechat-guile.c b/src/plugins/guile/weechat-guile.c
index 7e89c7ec5..2c26fad87 100644
--- a/src/plugins/guile/weechat-guile.c
+++ b/src/plugins/guile/weechat-guile.c
@@ -44,7 +44,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Support of scheme scripts (with Guile)"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(4070);
+WEECHAT_PLUGIN_PRIORITY(GUILE_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_guile_plugin = NULL;
diff --git a/src/plugins/guile/weechat-guile.h b/src/plugins/guile/weechat-guile.h
index 2fc6cd668..8776122c8 100644
--- a/src/plugins/guile/weechat-guile.h
+++ b/src/plugins/guile/weechat-guile.h
@@ -24,6 +24,7 @@
#define weechat_plugin weechat_guile_plugin
#define GUILE_PLUGIN_NAME "guile"
+#define GUILE_PLUGIN_PRIORITY 4070
#define GUILE_CURRENT_SCRIPT_NAME ((guile_current_script) ? guile_current_script->name : "-")
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index 6e476f648..5362ca468 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -2732,7 +2732,7 @@ irc_config_init ()
WEECHAT_HASHTABLE_STRING,
NULL, NULL);
- irc_config_file = weechat_config_new (IRC_CONFIG_NAME,
+ irc_config_file = weechat_config_new (IRC_CONFIG_PRIO_NAME,
&irc_config_reload, NULL, NULL);
if (!irc_config_file)
return 0;
diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h
index 2bfcb9fc1..7b67d4fca 100644
--- a/src/plugins/irc/irc-config.h
+++ b/src/plugins/irc/irc-config.h
@@ -21,6 +21,7 @@
#define WEECHAT_PLUGIN_IRC_CONFIG_H
#define IRC_CONFIG_NAME "irc"
+#define IRC_CONFIG_PRIO_NAME (TO_STR(IRC_PLUGIN_PRIORITY) "|" IRC_CONFIG_NAME)
enum t_irc_config_look_server_buffer
{
diff --git a/src/plugins/irc/irc.c b/src/plugins/irc/irc.c
index a035a63e8..d6e66943d 100644
--- a/src/plugins/irc/irc.c
+++ b/src/plugins/irc/irc.c
@@ -52,7 +52,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("IRC (Internet Relay Chat) protocol"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(6000);
+WEECHAT_PLUGIN_PRIORITY(IRC_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_irc_plugin = NULL;
diff --git a/src/plugins/irc/irc.h b/src/plugins/irc/irc.h
index 4a59aeb59..ccdf6a4e4 100644
--- a/src/plugins/irc/irc.h
+++ b/src/plugins/irc/irc.h
@@ -23,6 +23,7 @@
#define weechat_plugin weechat_irc_plugin
#define IRC_PLUGIN_NAME "irc"
+#define IRC_PLUGIN_PRIORITY 6000
extern struct t_weechat_plugin *weechat_irc_plugin;
diff --git a/src/plugins/javascript/weechat-js.cpp b/src/plugins/javascript/weechat-js.cpp
index caad9956f..3fc9c545f 100644
--- a/src/plugins/javascript/weechat-js.cpp
+++ b/src/plugins/javascript/weechat-js.cpp
@@ -35,11 +35,11 @@ extern "C"
#include "weechat-js-v8.h"
WEECHAT_PLUGIN_NAME(JS_PLUGIN_NAME);
-WEECHAT_PLUGIN_DESCRIPTION("Support of javascript scripts");
+WEECHAT_PLUGIN_DESCRIPTION(N_("Support of javascript scripts"));
WEECHAT_PLUGIN_AUTHOR("Koka El Kiwi <kokakiwi@kokakiwi.net>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(4060);
+WEECHAT_PLUGIN_PRIORITY(JS_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_js_plugin = NULL;
diff --git a/src/plugins/javascript/weechat-js.h b/src/plugins/javascript/weechat-js.h
index 8a87c0a02..7c653b35b 100644
--- a/src/plugins/javascript/weechat-js.h
+++ b/src/plugins/javascript/weechat-js.h
@@ -35,6 +35,7 @@
#define weechat_plugin weechat_js_plugin
#define JS_PLUGIN_NAME "javascript"
+#define JS_PLUGIN_PRIORITY 4060
#define JS_CURRENT_SCRIPT_NAME ((js_current_script) ? js_current_script->name : "-")
diff --git a/src/plugins/logger/logger-config.c b/src/plugins/logger/logger-config.c
index f2a50329c..d254cabe3 100644
--- a/src/plugins/logger/logger-config.c
+++ b/src/plugins/logger/logger-config.c
@@ -462,7 +462,7 @@ logger_config_init ()
{
struct t_config_section *ptr_section;
- logger_config_file = weechat_config_new (LOGGER_CONFIG_NAME,
+ logger_config_file = weechat_config_new (LOGGER_CONFIG_PRIO_NAME,
NULL, NULL, NULL);
if (!logger_config_file)
return 0;
diff --git a/src/plugins/logger/logger-config.h b/src/plugins/logger/logger-config.h
index 0b4d5a6f2..45ec8aad5 100644
--- a/src/plugins/logger/logger-config.h
+++ b/src/plugins/logger/logger-config.h
@@ -21,6 +21,7 @@
#define WEECHAT_PLUGIN_LOGGER_CONFIG_H
#define LOGGER_CONFIG_NAME "logger"
+#define LOGGER_CONFIG_PRIO_NAME (TO_STR(LOGGER_PLUGIN_PRIORITY) "|" LOGGER_CONFIG_NAME)
extern struct t_config_option *logger_config_look_backlog;
extern struct t_config_option *logger_config_look_backlog_conditions;
diff --git a/src/plugins/logger/logger.c b/src/plugins/logger/logger.c
index cdfb48f0b..ef817faa3 100644
--- a/src/plugins/logger/logger.c
+++ b/src/plugins/logger/logger.c
@@ -41,7 +41,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Log buffers to files"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(15000);
+WEECHAT_PLUGIN_PRIORITY(LOGGER_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_logger_plugin = NULL;
diff --git a/src/plugins/logger/logger.h b/src/plugins/logger/logger.h
index 558c40315..e1b5a137e 100644
--- a/src/plugins/logger/logger.h
+++ b/src/plugins/logger/logger.h
@@ -22,6 +22,7 @@
#define weechat_plugin weechat_logger_plugin
#define LOGGER_PLUGIN_NAME "logger"
+#define LOGGER_PLUGIN_PRIORITY 15000
#define LOGGER_LEVEL_DEFAULT 9
diff --git a/src/plugins/lua/weechat-lua.c b/src/plugins/lua/weechat-lua.c
index f4a35253d..cce139136 100644
--- a/src/plugins/lua/weechat-lua.c
+++ b/src/plugins/lua/weechat-lua.c
@@ -40,7 +40,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Support of lua scripts"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(4050);
+WEECHAT_PLUGIN_PRIORITY(LUA_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_lua_plugin = NULL;
diff --git a/src/plugins/lua/weechat-lua.h b/src/plugins/lua/weechat-lua.h
index 0b6ef3aab..f552574b4 100644
--- a/src/plugins/lua/weechat-lua.h
+++ b/src/plugins/lua/weechat-lua.h
@@ -23,6 +23,7 @@
#define weechat_plugin weechat_lua_plugin
#define LUA_PLUGIN_NAME "lua"
+#define LUA_PLUGIN_PRIORITY 4050
#define LUA_CURRENT_SCRIPT_NAME ((lua_current_script) ? lua_current_script->name : "-")
diff --git a/src/plugins/perl/weechat-perl.c b/src/plugins/perl/weechat-perl.c
index df3cbfe68..fc97edece 100644
--- a/src/plugins/perl/weechat-perl.c
+++ b/src/plugins/perl/weechat-perl.c
@@ -37,7 +37,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Support of perl scripts"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(4040);
+WEECHAT_PLUGIN_PRIORITY(PERL_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_perl_plugin = NULL;
diff --git a/src/plugins/perl/weechat-perl.h b/src/plugins/perl/weechat-perl.h
index 3ff330d44..5f5bc6f10 100644
--- a/src/plugins/perl/weechat-perl.h
+++ b/src/plugins/perl/weechat-perl.h
@@ -22,6 +22,7 @@
#define weechat_plugin weechat_perl_plugin
#define PERL_PLUGIN_NAME "perl"
+#define PERL_PLUGIN_PRIORITY 4040
#define PERL_CURRENT_SCRIPT_NAME ((perl_current_script) ? perl_current_script->name : "-")
diff --git a/src/plugins/php/weechat-php.c b/src/plugins/php/weechat-php.c
index 4e557d31a..97b9723ef 100644
--- a/src/plugins/php/weechat-php.c
+++ b/src/plugins/php/weechat-php.c
@@ -53,7 +53,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Support of PHP scripts"));
WEECHAT_PLUGIN_AUTHOR("Adam Saponara <as@php.net>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(4030);
+WEECHAT_PLUGIN_PRIORITY(PHP_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_php_plugin = NULL;
diff --git a/src/plugins/php/weechat-php.h b/src/plugins/php/weechat-php.h
index ffe3cf841..331b352ee 100644
--- a/src/plugins/php/weechat-php.h
+++ b/src/plugins/php/weechat-php.h
@@ -36,6 +36,8 @@
#define weechat_plugin weechat_php_plugin
#define PHP_PLUGIN_NAME "php"
+#define PHP_PLUGIN_PRIORITY 4030
+
#define PHP_WEECHAT_VERSION "0.1"
#define PHP_CURRENT_SCRIPT_NAME ((php_current_script) ? php_current_script->name : "-")
diff --git a/src/plugins/plugin-config.c b/src/plugins/plugin-config.c
index 7538c1863..890bc20ed 100644
--- a/src/plugins/plugin-config.c
+++ b/src/plugins/plugin-config.c
@@ -356,7 +356,7 @@ plugin_config_delete_desc (const void *pointer, void *data,
void
plugin_config_init ()
{
- plugin_config_file = config_file_new (NULL, PLUGIN_CONFIG_NAME,
+ plugin_config_file = config_file_new (NULL, PLUGIN_CONFIG_PRIO_NAME,
&plugin_config_reload, NULL, NULL);
if (plugin_config_file)
{
diff --git a/src/plugins/plugin-config.h b/src/plugins/plugin-config.h
index c80d107af..507b67dfe 100644
--- a/src/plugins/plugin-config.h
+++ b/src/plugins/plugin-config.h
@@ -21,6 +21,7 @@
#define WEECHAT_PLUGIN_PLUGIN_CONFIG_H
#define PLUGIN_CONFIG_NAME "plugins"
+#define PLUGIN_CONFIG_PRIO_NAME "100000|plugins"
extern struct t_config_file *plugin_config;
extern struct t_config_option *plugin_options;
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;
diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c
index 96ce66a75..b0cc081b9 100644
--- a/src/plugins/python/weechat-python.c
+++ b/src/plugins/python/weechat-python.c
@@ -40,7 +40,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Support of python scripts"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(4020);
+WEECHAT_PLUGIN_PRIORITY(PYTHON_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_python_plugin = NULL;
diff --git a/src/plugins/python/weechat-python.h b/src/plugins/python/weechat-python.h
index d779268e1..a221d30bc 100644
--- a/src/plugins/python/weechat-python.h
+++ b/src/plugins/python/weechat-python.h
@@ -23,6 +23,7 @@
#define weechat_plugin weechat_python_plugin
#define PYTHON_PLUGIN_NAME "python"
+#define PYTHON_PLUGIN_PRIORITY 4020
#define PYTHON_CURRENT_SCRIPT_NAME ((python_current_script) ? python_current_script->name : "-")
diff --git a/src/plugins/relay/relay-config.c b/src/plugins/relay/relay-config.c
index f0715c134..6c65f6112 100644
--- a/src/plugins/relay/relay-config.c
+++ b/src/plugins/relay/relay-config.c
@@ -891,7 +891,7 @@ relay_config_init ()
{
struct t_config_section *ptr_section;
- relay_config_file = weechat_config_new (RELAY_CONFIG_NAME,
+ relay_config_file = weechat_config_new (RELAY_CONFIG_PRIO_NAME,
&relay_config_reload, NULL, NULL);
if (!relay_config_file)
return 0;
diff --git a/src/plugins/relay/relay-config.h b/src/plugins/relay/relay-config.h
index eda75b368..67a35d97c 100644
--- a/src/plugins/relay/relay-config.h
+++ b/src/plugins/relay/relay-config.h
@@ -23,6 +23,7 @@
#include <regex.h>
#define RELAY_CONFIG_NAME "relay"
+#define RELAY_CONFIG_PRIO_NAME (TO_STR(RELAY_PLUGIN_PRIORITY) "|" RELAY_CONFIG_NAME)
extern struct t_config_file *relay_config_file;
extern struct t_config_section *relay_config_section_port;
diff --git a/src/plugins/relay/relay.c b/src/plugins/relay/relay.c
index 9eaca1bac..2553041ad 100644
--- a/src/plugins/relay/relay.c
+++ b/src/plugins/relay/relay.c
@@ -42,7 +42,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Relay WeeChat data to remote application "
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(5000);
+WEECHAT_PLUGIN_PRIORITY(RELAY_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_relay_plugin = NULL;
diff --git a/src/plugins/relay/relay.h b/src/plugins/relay/relay.h
index 8956de2e2..346403a76 100644
--- a/src/plugins/relay/relay.h
+++ b/src/plugins/relay/relay.h
@@ -22,6 +22,7 @@
#define weechat_plugin weechat_relay_plugin
#define RELAY_PLUGIN_NAME "relay"
+#define RELAY_PLUGIN_PRIORITY 5000
extern struct t_weechat_plugin *weechat_relay_plugin;
diff --git a/src/plugins/ruby/weechat-ruby.c b/src/plugins/ruby/weechat-ruby.c
index ed9348f47..922c77d9f 100644
--- a/src/plugins/ruby/weechat-ruby.c
+++ b/src/plugins/ruby/weechat-ruby.c
@@ -61,7 +61,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Support of ruby scripts"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(4010);
+WEECHAT_PLUGIN_PRIORITY(RUBY_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_ruby_plugin = NULL;
diff --git a/src/plugins/ruby/weechat-ruby.h b/src/plugins/ruby/weechat-ruby.h
index 405a27106..514965169 100644
--- a/src/plugins/ruby/weechat-ruby.h
+++ b/src/plugins/ruby/weechat-ruby.h
@@ -23,6 +23,7 @@
#define weechat_plugin weechat_ruby_plugin
#define RUBY_PLUGIN_NAME "ruby"
+#define RUBY_PLUGIN_PRIORITY 4010
#define RUBY_CURRENT_SCRIPT_NAME ((ruby_current_script) ? ruby_current_script->name : "-")
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 <flashcode@flashtux.org>");
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
diff --git a/src/plugins/spell/spell-config.c b/src/plugins/spell/spell-config.c
index 4e112f0f8..c31ef3bf7 100644
--- a/src/plugins/spell/spell-config.c
+++ b/src/plugins/spell/spell-config.c
@@ -441,7 +441,7 @@ spell_config_init ()
{
struct t_config_section *ptr_section;
- spell_config_file = weechat_config_new (SPELL_CONFIG_NAME,
+ spell_config_file = weechat_config_new (SPELL_CONFIG_PRIO_NAME,
NULL, NULL, NULL);
if (!spell_config_file)
return 0;
diff --git a/src/plugins/spell/spell-config.h b/src/plugins/spell/spell-config.h
index a27720f34..f1fad2871 100644
--- a/src/plugins/spell/spell-config.h
+++ b/src/plugins/spell/spell-config.h
@@ -22,7 +22,7 @@
#define WEECHAT_PLUGIN_SPELL_CONFIG_H
#define SPELL_CONFIG_NAME "spell"
-
+#define SPELL_CONFIG_PRIO_NAME (TO_STR(SPELL_PLUGIN_PRIORITY) "|" SPELL_CONFIG_NAME)
extern struct t_config_option *spell_config_color_misspelled;
extern struct t_config_option *spell_config_color_suggestion;
diff --git a/src/plugins/spell/spell.c b/src/plugins/spell/spell.c
index 3bf011ec0..c1e02c6a0 100644
--- a/src/plugins/spell/spell.c
+++ b/src/plugins/spell/spell.c
@@ -48,7 +48,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Spell checker for input"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(12000);
+WEECHAT_PLUGIN_PRIORITY(SPELL_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_spell_plugin = NULL;
diff --git a/src/plugins/spell/spell.h b/src/plugins/spell/spell.h
index 916e0a05a..b582eff65 100644
--- a/src/plugins/spell/spell.h
+++ b/src/plugins/spell/spell.h
@@ -29,6 +29,7 @@
#define weechat_plugin weechat_spell_plugin
#define SPELL_PLUGIN_NAME "spell"
+#define SPELL_PLUGIN_PRIORITY 12000
struct t_spell_code
{
diff --git a/src/plugins/tcl/weechat-tcl.c b/src/plugins/tcl/weechat-tcl.c
index af0cc71e1..e1b3783ba 100644
--- a/src/plugins/tcl/weechat-tcl.c
+++ b/src/plugins/tcl/weechat-tcl.c
@@ -40,7 +40,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Support of tcl scripts"));
WEECHAT_PLUGIN_AUTHOR("Dmitry Kobylin <fnfal@academ.tsc.ru>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(4000);
+WEECHAT_PLUGIN_PRIORITY(TCL_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_tcl_plugin = NULL;
diff --git a/src/plugins/tcl/weechat-tcl.h b/src/plugins/tcl/weechat-tcl.h
index da28b5a92..2d71e3f14 100644
--- a/src/plugins/tcl/weechat-tcl.h
+++ b/src/plugins/tcl/weechat-tcl.h
@@ -23,6 +23,7 @@
#define weechat_plugin weechat_tcl_plugin
#define TCL_PLUGIN_NAME "tcl"
+#define TCL_PLUGIN_PRIORITY 4000
#define TCL_CURRENT_SCRIPT_NAME ((tcl_current_script) ? tcl_current_script->name : "-")
diff --git a/src/plugins/trigger/trigger-config.c b/src/plugins/trigger/trigger-config.c
index 641eb951d..001d7b958 100644
--- a/src/plugins/trigger/trigger-config.c
+++ b/src/plugins/trigger/trigger-config.c
@@ -686,7 +686,8 @@ trigger_config_init ()
struct t_config_section *ptr_section;
trigger_config_file = weechat_config_new (
- TRIGGER_CONFIG_NAME, &trigger_config_reload_cb, NULL, NULL);
+ TRIGGER_CONFIG_PRIO_NAME,
+ &trigger_config_reload_cb, NULL, NULL);
if (!trigger_config_file)
return 0;
diff --git a/src/plugins/trigger/trigger-config.h b/src/plugins/trigger/trigger-config.h
index e364d5303..f4653af1d 100644
--- a/src/plugins/trigger/trigger-config.h
+++ b/src/plugins/trigger/trigger-config.h
@@ -21,6 +21,7 @@
#define WEECHAT_PLUGIN_TRIGGER_CONFIG_H
#define TRIGGER_CONFIG_NAME "trigger"
+#define TRIGGER_CONFIG_PRIO_NAME (TO_STR(TRIGGER_PLUGIN_PRIORITY) "|" TRIGGER_CONFIG_NAME)
#define TRIGGER_CONFIG_SECTION_TRIGGER "trigger"
extern struct t_config_file *trigger_config_file;
diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c
index b9217f7bb..d5d998d2d 100644
--- a/src/plugins/trigger/trigger.c
+++ b/src/plugins/trigger/trigger.c
@@ -39,7 +39,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Text replacement and command execution on events
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(13000);
+WEECHAT_PLUGIN_PRIORITY(TRIGGER_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_trigger_plugin = NULL;
diff --git a/src/plugins/trigger/trigger.h b/src/plugins/trigger/trigger.h
index 3c4804f43..0cc0afaf1 100644
--- a/src/plugins/trigger/trigger.h
+++ b/src/plugins/trigger/trigger.h
@@ -24,6 +24,7 @@
#define weechat_plugin weechat_trigger_plugin
#define TRIGGER_PLUGIN_NAME "trigger"
+#define TRIGGER_PLUGIN_PRIORITY 13000
#define TRIGGER_HOOK_DEFAULT_CONDITIONS "${...}"
#define TRIGGER_HOOK_DEFAULT_REGEX "/abc/def"
diff --git a/src/plugins/typing/typing-config.c b/src/plugins/typing/typing-config.c
index ce500cb63..04785e99a 100644
--- a/src/plugins/typing/typing-config.c
+++ b/src/plugins/typing/typing-config.c
@@ -113,7 +113,7 @@ typing_config_init ()
struct t_config_section *ptr_section;
typing_config_file = weechat_config_new (
- TYPING_CONFIG_NAME,
+ TYPING_CONFIG_PRIO_NAME,
&typing_config_reload, NULL, NULL);
if (!typing_config_file)
return 0;
diff --git a/src/plugins/typing/typing-config.h b/src/plugins/typing/typing-config.h
index c9238a26b..f4ec6a067 100644
--- a/src/plugins/typing/typing-config.h
+++ b/src/plugins/typing/typing-config.h
@@ -21,6 +21,7 @@
#define WEECHAT_PLUGIN_TYPING_CONFIG_H
#define TYPING_CONFIG_NAME "typing"
+#define TYPING_CONFIG_PRIO_NAME (TO_STR(TYPING_PLUGIN_PRIORITY) "|" TYPING_CONFIG_NAME)
extern struct t_config_option *typing_config_look_delay_purge_paused;
extern struct t_config_option *typing_config_look_delay_purge_typing;
diff --git a/src/plugins/typing/typing.c b/src/plugins/typing/typing.c
index ff8ece005..51fc3385a 100644
--- a/src/plugins/typing/typing.c
+++ b/src/plugins/typing/typing.c
@@ -36,7 +36,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("Typing status of users"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(8000);
+WEECHAT_PLUGIN_PRIORITY(TYPING_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_typing_plugin = NULL;
diff --git a/src/plugins/typing/typing.h b/src/plugins/typing/typing.h
index 16537b42e..96216c399 100644
--- a/src/plugins/typing/typing.h
+++ b/src/plugins/typing/typing.h
@@ -22,6 +22,7 @@
#define weechat_plugin weechat_typing_plugin
#define TYPING_PLUGIN_NAME "typing"
+#define TYPING_PLUGIN_PRIORITY 8000
struct t_typing
{
diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h
index 3f697fa73..72c55ec35 100644
--- a/src/plugins/weechat-plugin.h
+++ b/src/plugins/weechat-plugin.h
@@ -248,6 +248,10 @@ struct timeval;
return WEECHAT_RC_ERROR; \
}
+/* macro to convert integer to string */
+#define TO_STR_HELPER(x) #x
+#define TO_STR(x) TO_STR_HELPER(x)
+
struct t_weechat_plugin
{
/* plugin variables */
diff --git a/src/plugins/xfer/xfer-config.c b/src/plugins/xfer/xfer-config.c
index 09c9172d1..ae92ffa38 100644
--- a/src/plugins/xfer/xfer-config.c
+++ b/src/plugins/xfer/xfer-config.c
@@ -114,7 +114,7 @@ xfer_config_init ()
{
struct t_config_section *ptr_section;
- xfer_config_file = weechat_config_new (XFER_CONFIG_NAME,
+ xfer_config_file = weechat_config_new (XFER_CONFIG_PRIO_NAME,
&xfer_config_reload, NULL, NULL);
if (!xfer_config_file)
return 0;
diff --git a/src/plugins/xfer/xfer-config.h b/src/plugins/xfer/xfer-config.h
index 76cc91b2e..d22807b51 100644
--- a/src/plugins/xfer/xfer-config.h
+++ b/src/plugins/xfer/xfer-config.h
@@ -21,6 +21,7 @@
#define WEECHAT_PLUGIN_XFER_CONFIG_H
#define XFER_CONFIG_NAME "xfer"
+#define XFER_CONFIG_PRIO_NAME (TO_STR(XFER_PLUGIN_PRIORITY) "|" XFER_CONFIG_NAME)
#define XFER_CONFIG_PROGRESS_BAR_MAX_SIZE 256
diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c
index 48d91c146..4908a6df8 100644
--- a/src/plugins/xfer/xfer.c
+++ b/src/plugins/xfer/xfer.c
@@ -50,7 +50,7 @@ WEECHAT_PLUGIN_DESCRIPTION(N_("DCC file transfer and direct chat"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
-WEECHAT_PLUGIN_PRIORITY(7000);
+WEECHAT_PLUGIN_PRIORITY(XFER_PLUGIN_PRIORITY);
struct t_weechat_plugin *weechat_xfer_plugin = NULL;
diff --git a/src/plugins/xfer/xfer.h b/src/plugins/xfer/xfer.h
index 4fa889339..c01afa220 100644
--- a/src/plugins/xfer/xfer.h
+++ b/src/plugins/xfer/xfer.h
@@ -27,6 +27,7 @@
#define weechat_plugin weechat_xfer_plugin
#define XFER_PLUGIN_NAME "xfer"
+#define XFER_PLUGIN_PRIORITY 7000
/* xfer types */