diff options
author | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-02-15 02:15:57 +0000 |
---|---|---|
committer | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-02-15 02:15:57 +0000 |
commit | 1da30bfdeaa391c9179a9f8719d24e9f45d9ae65 (patch) | |
tree | 703a7744d30b532b56abd14b0ef4c8567638c4c0 | |
parent | 59f3a38ffd13b9fa2d31b89efa7558f4919c810b (diff) |
BUILD : 1.7.8 (575) BUGS : N/A NOTES : Some event clean ups found by heinz today
git-svn-id: svn://svn.anope.org/anope/trunk@575 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@425 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | docs/EVENTS | 6 | ||||
-rw-r--r-- | include/events.h | 3 | ||||
-rw-r--r-- | src/nickserv.c | 11 | ||||
-rw-r--r-- | src/tools/Makefile | 4 | ||||
-rw-r--r-- | src/users.c | 1 | ||||
-rw-r--r-- | version.log | 6 |
6 files changed, 22 insertions, 9 deletions
diff --git a/docs/EVENTS b/docs/EVENTS index 4d4819588..0fae9f766 100644 --- a/docs/EVENTS +++ b/docs/EVENTS @@ -146,8 +146,10 @@ E. With that setup in your function you will be passed 1 items, the message is v | EVENT_RESTART | EVENT_START |
| EVENT_SHUTDOWN | EVENT_START, EVENT_STOP |
| EVENT_SIGNAL | quit message |
-| EVENT_NICK_REGISTED | Nick |
+| EVENT_NICK_REGISTERED | Nick |
| EVENT_NICK_DROPPED | Nick |
| EVENT_NICK_FORBIDDEN | Nick |
| EVENT_CHANGE_NICK | Nick |
-==============================================================================================
\ No newline at end of file +| EVENT_USER_LOGOFF | Nick |
+==============================================================================================
+
diff --git a/include/events.h b/include/events.h index 7595d466d..56d433223 100644 --- a/include/events.h +++ b/include/events.h @@ -35,8 +35,9 @@ #define EVENT_RESTART "restart" #define EVENT_SHUTDOWN "shutdown" #define EVENT_SIGNAL "signal" -#define EVENT_NICK_REGISTED "nick_registered" +#define EVENT_NICK_REGISTERED "nick_registered" #define EVENT_NICK_DROPPED "nick_dropped" #define EVENT_NICK_FORBIDDEN "nick_forbidden" #define EVENT_CHANGE_NICK "change_nick" +#define EVENT_USER_LOGOFF "user_logoff" diff --git a/src/nickserv.c b/src/nickserv.c index a3a81f5ab..b839d637a 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -2306,7 +2306,7 @@ static int do_confirm(User * u) else notice_lang(s_NickServ, u, NICK_REGISTERED_NO_MASK, u->nick); - send_event(EVENT_NICK_REGISTED, u->nick); + send_event(EVENT_NICK_REGISTERED, u->nick); #ifndef USE_ENCRYPTION notice_lang(s_NickServ, u, NICK_PASSWORD_IS, na->nc->pass); #endif @@ -2754,6 +2754,7 @@ static int do_drop(User * u) NickRequest *nr = NULL; int is_servadmin = is_services_admin(u); int is_mine; /* Does the nick being dropped belong to the user that is dropping? */ + char *my_nick; if (readonly && !is_servadmin) { notice_lang(s_NickServ, u, NICK_DROP_DISABLED); @@ -2783,6 +2784,8 @@ static int do_drop(User * u) } is_mine = (u->na && (u->na->nc == na->nc)); + if (is_mine && !nick) + my_nick = sstrdup(na->nick); if (is_mine && !nick_identified(u)) { notice_lang(s_NickServ, u, NICK_IDENTIFY_REQUIRED, s_NickServ); @@ -2804,8 +2807,7 @@ static int do_drop(User * u) na->nick, na->nc->display, (na->nc->email ? na->nc->email : "none")); delnick(na); - - send_event(EVENT_NICK_DROPPED, nick); + send_event(EVENT_NICK_DROPPED, (my_nick ? my_nick : nick)); if (!is_mine) { if (WallDrop) @@ -2817,6 +2819,9 @@ static int do_drop(User * u) notice_lang(s_NickServ, u, NICK_X_DROPPED, nick); else notice_lang(s_NickServ, u, NICK_DROPPED); + if (my_nick) { + free(my_nick); + } } } return MOD_CONT; diff --git a/src/tools/Makefile b/src/tools/Makefile index 54e3ca8e8..7b3510539 100644 --- a/src/tools/Makefile +++ b/src/tools/Makefile @@ -1,5 +1,5 @@ -OBJS = anopesmpt.o -SRCS = anopesmpt.c +OBJS = anopesmtp.o +SRCS = anopesmtp.c INCLUDES = ../../include/services.h diff --git a/src/users.c b/src/users.c index 85c89648c..825b9d4fd 100644 --- a/src/users.c +++ b/src/users.c @@ -210,6 +210,7 @@ void delete_user(User * user) normalizeBuffer(user->realname), user->server->name); } } + send_event(EVENT_USER_LOGOFF, user->nick); if (debug >= 2) alog("debug: delete_user() called"); diff --git a/version.log b/version.log index e0817915e..de8dbdd47 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="8" -VERSION_BUILD="574" +VERSION_BUILD="575" # $Log$ # +# BUILD : 1.7.8 (575) +# BUGS : N/A +# NOTES : Some event clean ups found by heinz today +# # BUILD : 1.7.8 (574) # BUGS : N/A # NOTES : Internal Events, Win32 can build with encryption, nickIsServices() works if format is nick@services |