summaryrefslogtreecommitdiff
path: root/src/plugins/rmodifier/rmodifier.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-08-11 18:42:38 +0200
committerSebastien Helleu <flashcode@flashtux.org>2010-08-11 18:42:38 +0200
commit6317dba7904c0e4f42ea9a6c7cdd623f1408a023 (patch)
treea2575205ecad90049da80c156801af618805b0ed /src/plugins/rmodifier/rmodifier.c
parentd59d099e82378669a2bea5aac5c9d9862438f51e (diff)
downloadweechat-6317dba7904c0e4f42ea9a6c7cdd623f1408a023.zip
Add priority for hooks (task #10550)
Diffstat (limited to 'src/plugins/rmodifier/rmodifier.c')
-rw-r--r--src/plugins/rmodifier/rmodifier.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/rmodifier/rmodifier.c b/src/plugins/rmodifier/rmodifier.c
index e6fe6ec38..edcaf51c6 100644
--- a/src/plugins/rmodifier/rmodifier.c
+++ b/src/plugins/rmodifier/rmodifier.c
@@ -247,7 +247,7 @@ rmodifier_create_regex (struct t_rmodifier *rmodifier)
void
rmodifier_hook_modifiers (struct t_rmodifier *rmodifier)
{
- char **argv;
+ char **argv, str_modifier[128];
int argc, i;
argv = weechat_string_split (rmodifier->modifiers, ",", 0, 0, &argc);
@@ -259,7 +259,13 @@ rmodifier_hook_modifiers (struct t_rmodifier *rmodifier)
{
for (i = 0; i < argc; i++)
{
- rmodifier->hooks[i] = weechat_hook_modifier (argv[i],
+ /*
+ * we use a high priority here, so that other modifiers
+ * (from other plugins) will be called after this one
+ */
+ snprintf (str_modifier, sizeof (str_modifier) - 1,
+ "5000|%s", argv[i]);
+ rmodifier->hooks[i] = weechat_hook_modifier (str_modifier,
&rmodifier_modifier_cb,
rmodifier);
}