diff options
-rw-r--r-- | Changes | 4 | ||||
-rw-r--r-- | docs/EVENTS | 12 | ||||
-rw-r--r-- | include/events.h | 2 | ||||
-rw-r--r-- | src/nickserv.c | 6 | ||||
-rw-r--r-- | version.log | 3 |
5 files changed, 25 insertions, 2 deletions
@@ -2,12 +2,14 @@ Anope Version 1.8 - GIT ----------------------- 08/18 A Added support for Hybrid's channel mode +S [#1319] 08/18 A Added support for Hybrid's channel mode +O [#1320] +08/21 A Added internal event when a nickcore is dropped. [ #00] +08/21 A Added internal event when a nickcore gets a new display nick. [ #00] 08/18 R Removed support for Hybrid's (old) channel mode +a [#1318] 05/30 F Fixed removing vhosts on InspIRCd when m_cloaking is unloaded [#1273] 07/23 F Fixed a potential crash in the badwords kicker [ #00] 08/09 F Fixed deopping the first user to join a channel during a burst [#1287] 08/10 F Fixed loading bs_fantasy_owner on InspIRCd 2.0 on startup [ #00] -08/21 F Send DROP event when forbidding nicks and channels. +08/21 F Send DROP event when forbidding nicks and channels. [ #00] Anope Version 1.8.6 ------------------- diff --git a/docs/EVENTS b/docs/EVENTS index d8f22325d..96b324203 100644 --- a/docs/EVENTS +++ b/docs/EVENTS @@ -344,6 +344,18 @@ Anope Internal Events A user's nick has just been forbidden. av[0] The nickname that has just been forbidden. + EVENT_CORE_DROPPED + A NickCore will be dropped. Usually send when the last alias is dopped. + This is send BEFORE the event that confirms deletion of the alias. + Note that this event is send before the core data is removed. + av[0] The display nickname of the core that is being dropped. + + EVENT_CORE_NEWDISPLAY + The display nick of a NickCore is being changed. + This is send BEFORE the actual change is made in the database. + av[0] The old display nickname of the core. + av[1] The new display nickname of the core. + EVENT_NICK_GHOSTED A user has just been ghosted. av[0] EVENT_START or EVENT_STOP. EVENT_START when the user is about diff --git a/include/events.h b/include/events.h index 2c221b2a0..9e2c3dc3c 100644 --- a/include/events.h +++ b/include/events.h @@ -45,6 +45,8 @@ #define EVENT_NICK_DROPPED "nick_dropped" #define EVENT_NICK_FORBIDDEN "nick_forbidden" #define EVENT_NICK_EXPIRE "nick_expire" +#define EVENT_CORE_DROPPED "nickcore_dropped" +#define EVENT_CORE_NEWDISPLAY "nickcore_newdisplay" #define EVENT_CHANGE_NICK "change_nick" #define EVENT_USER_LOGOFF "user_logoff" #define EVENT_NICK_GHOSTED "nick_ghosted" 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); diff --git a/version.log b/version.log index 2d1db68a0..9e65a93a3 100644 --- a/version.log +++ b/version.log @@ -8,9 +8,10 @@ VERSION_MAJOR="1" VERSION_MINOR="8" VERSION_PATCH="7" VERSION_EXTRA="-git" -VERSION_BUILD="3080" +VERSION_BUILD="3081" # $Log$ # Changes since 1.8.6 Release +#Revision 3081 - 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.) #Revision 3080 - Send DROP event when forbidding nicks and channels, if applicable. #Revision 3079 - Bug #1318 - #1320 - Added support for Hybrid's +S and +O channel modes, and removed support for +a #Revision 3078 - Fixed loading bs_fantasy_owner on startup when using InspIRCd 2.0 |