1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 07:36:39 +02:00

Added an internal events called when nick is ghosted and when nick is recovered

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2976 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
phil-lavin
2010-05-23 00:47:37 +00:00
parent 1b636ed4ff
commit ff17a9af7e
6 changed files with 30 additions and 2 deletions
+2
View File
@@ -3,6 +3,8 @@ Anope Version 1.8 - SVN
5/5 A Added an internal event called when a nick is requested [ #00]
5/9 A Added an Atheme to Anope database converter [ #00]
5/12 A Added logging for stateful commands [ #00]
5/22 A Added an internal event called when a nick is ghosted [ #00]
5/22 A Added an internal event called when a nick is recovered [ #00]
4/15 F Fixed os_info to backup its database on Windows [ #00]
4/15 F Fixed a potential crash in cs_clear ops [#1154]
4/16 F Fixed missing TS6SID on FJOIN in inspircd12 [ #00]
+15
View File
@@ -342,6 +342,14 @@ Anope Internal Events
A user's nick has just been forbidden.
av[0] The nickname that has just been forbidden.
EVENT_NICK_GHOSTED
A user has just been ghosted.
av[0] EVENT_START or EVENT_STOP. EVENT_START when the user is about
to be removed from the network, EVENT_STOP when this has been
done.
av[1] The nickname of the user doing the ghosting.
av[2] The nickname being ghosted.
EVENT_NICK_IDENTIFY
A user has just identified for it's nickname with NickServ.
av[0] The nickname of the user that just identified.
@@ -350,6 +358,13 @@ Anope Internal Events
A user has just (been) logged out.
av[0] The nickname of the user that has (been) logged out.
EVENT_NICK_RECOVERED
A user's nickname has just been recovered.
av[0] EVENT_START or EVENT_STOP. EVENT_START when the user is about
to be recovered, EVENT_STOP when this has been done.
av[1] The nickname of the user doing the recovery.
av[2] The nickname being recovered.
EVENT_NICK_REGISTERED
A new user has just registered it's nickname. This event is being
emitted when the registration is completed, but the user modes have not
+2
View File
@@ -48,6 +48,8 @@
#define EVENT_NICK_EXPIRE "nick_expire"
#define EVENT_CHANGE_NICK "change_nick"
#define EVENT_USER_LOGOFF "user_logoff"
#define EVENT_NICK_GHOSTED "nick_ghosted"
#define EVENT_NICK_RECOVERED "nick_recovered"
#define EVENT_GROUP "nick_group"
#define EVENT_NICK_IDENTIFY "nick_id"
#define EVENT_SERVER_SQUIT "server_squit"
+5 -1
View File
@@ -91,10 +91,12 @@ int do_ghost(User * u)
snprintf(buf, sizeof(buf), "GHOST command used by %s",
u->nick);
send_event(EVENT_NICK_GHOSTED, 3, EVENT_START, u->nick, nick);
alog("%s: %s!%s@%s used GHOST on %s",
s_NickServ, u->nick, u->username, u->host, u2->nick);
kill_user(s_NickServ, nick, buf);
notice_lang(s_NickServ, u, NICK_GHOST_KILLED, nick);
send_event(EVENT_NICK_GHOSTED, 3, EVENT_STOP, u->nick, nick);
} else {
notice_lang(s_NickServ, u, ACCESS_DENIED);
if (res == 0) {
@@ -110,14 +112,16 @@ int do_ghost(User * u)
snprintf(buf, sizeof(buf), "GHOST command used by %s",
u->nick);
send_event(EVENT_NICK_GHOSTED, 3, EVENT_START, u->nick, nick);
alog("%s: %s!%s@%s used GHOST on %s",
s_NickServ, u->nick, u->username, u->host, u2->nick);
kill_user(s_NickServ, nick, buf);
notice_lang(s_NickServ, u, NICK_GHOST_KILLED, nick);
send_event(EVENT_NICK_GHOSTED, 3, EVENT_STOP, u->nick, nick);
} else {
notice_lang(s_NickServ, u, ACCESS_DENIED);
}
}
return MOD_CONT;
}
+4
View File
@@ -106,6 +106,7 @@ int do_recover(User * u)
if (res == 1) {
char relstr[192];
send_event(EVENT_NICK_RECOVERED, 3, EVENT_START, u->nick, nick);
alog("%s: %s!%s@%s used RECOVER on %s",
s_NickServ, u->nick, u->username, u->host, u2->nick);
notice_lang(s_NickServ, u2, FORCENICKCHANGE_NOW);
@@ -115,6 +116,7 @@ int do_recover(User * u)
duration(u2->na, relstr, sizeof(relstr), NSReleaseTimeout);
notice_lang(s_NickServ, u, NICK_RECOVERED, s_NickServ, nick, relstr);
send_event(EVENT_NICK_RECOVERED, 3, EVENT_STOP, u->nick, nick);
} else {
notice_lang(s_NickServ, u, ACCESS_DENIED);
if (res == 0) {
@@ -128,6 +130,7 @@ int do_recover(User * u)
|| (!(na->nc->flags & NI_SECURE) && is_on_access(u, na->nc))) {
char relstr[192];
send_event(EVENT_NICK_RECOVERED, 3, EVENT_START, u->nick, nick);
alog("%s: %s!%s@%s used RECOVER on %s",
s_NickServ, u->nick, u->username, u->host, u2->nick);
notice_lang(s_NickServ, u2, FORCENICKCHANGE_NOW);
@@ -137,6 +140,7 @@ int do_recover(User * u)
duration(u2->na, relstr, sizeof(relstr), NSReleaseTimeout);
notice_lang(s_NickServ, u, NICK_RECOVERED, s_NickServ, nick, relstr);
send_event(EVENT_NICK_RECOVERED, 3, EVENT_STOP, u->nick, nick);
} else {
notice_lang(s_NickServ, u, ACCESS_DENIED);
}
+2 -1
View File
@@ -9,9 +9,10 @@ VERSION_MAJOR="1"
VERSION_MINOR="8"
VERSION_PATCH="4"
VERSION_EXTRA="-svn"
VERSION_BUILD="2969"
VERSION_BUILD="2976"
# $Log$ # Changes since the 1.8.4 Release
#Revision 2976 - Added an internal events called when nick is ghosted and when nick is recovered
#Revision 2969 - Extension to r2952 adding logging for BS BOT
#Revision 2966 - Fixed English in e-mail messages
#Revision 2962 - Fixed bug with r2952 (%s was used rather than %d)