1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 14:23:14 +02:00

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.)

This commit is contained in:
Viper
2011-08-22 00:25:34 +02:00
parent dc840e9b99
commit 783f77d367
5 changed files with 25 additions and 2 deletions
+3 -1
View File
@@ -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
-------------------
+12
View File
@@ -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
+2
View File
@@ -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"
+6
View File
@@ -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);
+2 -1
View File
@@ -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