diff options
author | Viper <viper@anope.org> | 2011-08-22 00:25:34 +0200 |
---|---|---|
committer | Viper <viper@anope.org> | 2011-08-22 00:25:34 +0200 |
commit | 783f77d367b6117658e87898db4b5c31e7299a4a (patch) | |
tree | b3103320b515c433eab223d17123eed5407ca6ee /src | |
parent | dc840e9b99adf78dbf5b11896f843c8ad7f4d732 (diff) |
Added event to warn modules a nickcore gets a new display nick or is about to be dropped. (This should enable modules to more easily link their data to anopes core data.)
Diffstat (limited to 'src')
-rw-r--r-- | src/nickserv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nickserv.c b/src/nickserv.c index d1d508f9a..a38894268 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -1422,6 +1422,7 @@ void change_core_display(NickCore * nc, char *newdisplay) /* Log ... */ alog("%s: changing %s nickname group display to %s", s_NickServ, nc->display, newdisplay); + send_event(EVENT_CORE_NEWDISPLAY, 2, nc->display, newdisplay); #ifdef USE_RDB /* Reflect this change in the database right away. This @@ -1464,6 +1465,11 @@ static int delcore(NickCore * nc) static char clause[128]; char *q_display; #endif + + /* Inform everyone we will be deleted.. + * Some modules may link to the core and should be told when we + * are no longer around.. ~ Viper */ + send_event(EVENT_CORE_DROPPED, 1, nc->display); /* (Hopefully complete) cleanup */ cs_remove_nick(nc); os_remove_nick(nc); |