diff --git a/extensions/invite_notify.c b/extensions/invite_notify.c index bc7c84f7..19708f90 100644 --- a/extensions/invite_notify.c +++ b/extensions/invite_notify.c @@ -13,7 +13,7 @@ static void m_invited(struct MsgBuf *, struct Client *, struct Client *, int, co static unsigned int CAP_INVITE_NOTIFY; mapi_hfn_list_av1 inv_notify_hfnlist[] = { - { "invite", hook_invite }, + { "invite", hook_invite, HOOK_MONITOR }, { NULL, NULL } }; diff --git a/extensions/m_webirc.c b/extensions/m_webirc.c index 04f59c96..2937189e 100644 --- a/extensions/m_webirc.c +++ b/extensions/m_webirc.c @@ -66,7 +66,8 @@ mapi_clist_av1 webirc_clist[] = { &webirc_msgtab, NULL }; static void new_local_user(void *data); mapi_hfn_list_av1 webirc_hfnlist[] = { - { "new_local_user", (hookfn) new_local_user }, + /* unintuitive but correct--we want to be called first */ + { "new_local_user", (hookfn) new_local_user, HOOK_LOWEST }, { NULL, NULL } }; diff --git a/extensions/override.c b/extensions/override.c index 20110a65..91b3d6eb 100644 --- a/extensions/override.c +++ b/extensions/override.c @@ -34,10 +34,10 @@ static void handle_client_exit(void *data); mapi_hfn_list_av1 override_hfnlist[] = { { "umode_changed", (hookfn) check_umode_change }, - { "get_channel_access", (hookfn) hack_channel_access }, - { "can_join", (hookfn) hack_can_join }, - { "can_kick", (hookfn) hack_can_kick }, - { "can_send", (hookfn) hack_can_send }, + { "get_channel_access", (hookfn) hack_channel_access, HOOK_HIGHEST }, + { "can_join", (hookfn) hack_can_join, HOOK_HIGHEST }, + { "can_kick", (hookfn) hack_can_kick, HOOK_HIGHEST }, + { "can_send", (hookfn) hack_can_send, HOOK_HIGHEST }, { "client_exit", (hookfn) handle_client_exit }, { NULL, NULL } }; diff --git a/extensions/override_kick_immunity.c b/extensions/override_kick_immunity.c index b6f7e518..df10ae8b 100644 --- a/extensions/override_kick_immunity.c +++ b/extensions/override_kick_immunity.c @@ -14,7 +14,7 @@ static const char override_kick_immunity_desc[] = static void can_kick(void *data); mapi_hfn_list_av1 override_kick_immunity_hfnlist[] = { - { "can_kick", (hookfn) can_kick }, + { "can_kick", (hookfn) can_kick, HOOK_HIGHEST }, { NULL, NULL } }; diff --git a/ircd/hook.c b/ircd/hook.c index bda9fc0c..bd6f39eb 100644 --- a/ircd/hook.c +++ b/ircd/hook.c @@ -198,7 +198,7 @@ add_hook_prio(const char *name, hookfn fn, enum hook_priority priority) entry->fn = fn; entry->priority = priority; - RB_DLINK_FOREACH(ptr, &hooks[i].hooks.head) + RB_DLINK_FOREACH(ptr, hooks[i].hooks.head) { struct hook_entry *o = ptr->data; if (entry->priority < o->priority) @@ -223,7 +223,7 @@ remove_hook(const char *name, hookfn fn) if((i = find_hook(name)) < 0) return; - RB_DLINK_FOREACH_SAFE(ptr, scratch, &hooks[i].hooks.head) + RB_DLINK_FOREACH_SAFE(ptr, scratch, hooks[i].hooks.head) { struct hook_entry *entry = ptr->data; if (entry->fn == fn)