diff --git a/src/mod/channels.mod/tclchan.c b/src/mod/channels.mod/tclchan.c index f40f9f8d2..e4b7f6ff7 100644 --- a/src/mod/channels.mod/tclchan.c +++ b/src/mod/channels.mod/tclchan.c @@ -2009,6 +2009,7 @@ static void init_channel(struct chanset_t *chan, int reset) chan->channel.member = nmalloc(sizeof *chan->channel.member); /* Since we don't have channel_malloc, manually bzero */ egg_bzero(chan->channel.member, sizeof *chan->channel.member); + do_hook_reset_member(); } if (flags & CHAN_RESETMODES) { diff --git a/src/mod/module.h b/src/mod/module.h index efab4174f..0e2f90ee9 100644 --- a/src/mod/module.h +++ b/src/mod/module.h @@ -528,6 +528,7 @@ typedef void (*chanout_butfunc)(int, int, const char *, ...) ATTRIBUTE_FORMAT(pr /* 324 - 327 */ #define find_member_from_nick ((memberlist * (*) (char *))global[324]) #define get_user_from_member ((struct userrec * (*) (memberlist *))global[325]) +#define do_hook_reset_member ((void (*) ())global[326]) /* hostmasking */ diff --git a/src/mod/modvals.h b/src/mod/modvals.h index a840e09cf..32ac50718 100644 --- a/src/mod/modvals.h +++ b/src/mod/modvals.h @@ -41,8 +41,8 @@ #define HOOK_DIE 15 #define HOOK_PRE_SELECT 16 #define HOOK_POST_SELECT 17 - -#define REAL_HOOKS 18 +#define HOOK_RESET_MEMBER 18 +#define REAL_HOOKS 19 #define HOOK_SHAREOUT 105 #define HOOK_SHAREIN 106 diff --git a/src/modules.c b/src/modules.c index 0fd005760..f393251cf 100644 --- a/src/modules.c +++ b/src/modules.c @@ -171,6 +171,7 @@ int (*rfc_toupper) (int) = _rfc_toupper; int (*rfc_tolower) (int) = _rfc_tolower; void (*dns_hostbyip) (sockname_t *) = core_dns_hostbyip; void (*dns_ipbyhost) (char *) = core_dns_ipbyhost; +void (*hook_reset_member) () = null_func; module_entry *module_list; dependancy *dependancy_list = NULL; @@ -626,6 +627,7 @@ Function global_table[] = { /* 324 - 327 */ (Function) find_member_from_nick, (Function) get_user_from_member, + (Function) do_hook_reset_member }; void init_modules(void) @@ -1212,3 +1214,7 @@ void do_module_report(int idx, int details, char *which) if (which) dprintf(idx, "No such module.\n"); } + +void do_hook_reset_member() { + call_hook(HOOK_RESET_MEMBER); +} diff --git a/src/modules.h b/src/modules.h index 839d5e87f..225119b9c 100644 --- a/src/modules.h +++ b/src/modules.h @@ -46,6 +46,7 @@ void mod_free(void *, const char *, const char *, int); void add_hook(int, Function); void del_hook(int, Function); void *get_next_hook(int, void *); +void do_hook_reset_member(); extern struct hook_entry { struct hook_entry *next;