1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 01:03:14 +02:00

Add priority for hooks (task #10550)

This commit is contained in:
Sebastien Helleu
2010-08-11 18:42:38 +02:00
parent d59d099e82
commit 6317dba790
5 changed files with 183 additions and 65 deletions
+8 -2
View File
@@ -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);
}