]> jfr.im git - irc/freenode/syn.git/commitdiff
Check masks on nick changes as well as new connections
authorStephen Bennett <redacted>
Fri, 15 May 2009 22:49:20 +0000 (23:49 +0100)
committerStephen Bennett <redacted>
Fri, 15 May 2009 22:49:20 +0000 (23:49 +0100)
masks.c

diff --git a/masks.c b/masks.c
index 4b7799a5042784a89c92b05fa29448dad5eed420..d659d43855751adb8dc6e51d98a491b2db05641e 100644 (file)
--- a/masks.c
+++ b/masks.c
@@ -175,6 +175,8 @@ void _modinit(module_t *m)
     command_add(&syn_setmask, syn_cmdtree);
     command_add(&syn_listmask, syn_cmdtree);
 
+    hook_add_event("nick_check");
+    hook_add_hook("nick_check", masks_newuser);
     hook_add_event("user_add");
     hook_add_hook("user_add", masks_newuser);
 
@@ -193,6 +195,7 @@ void _moddeinit()
     command_delete(&syn_listmask, syn_cmdtree);
 
     hook_del_hook("user_add", masks_newuser);
+    hook_del_hook("nick_check", masks_newuser);
 
     event_delete(check_expiry, NULL);
 }