summaryrefslogtreecommitdiff
path: root/src/nickserv.c
diff options
context:
space:
mode:
authortrystan 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
committertrystan 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
commit1da30bfdeaa391c9179a9f8719d24e9f45d9ae65 (patch)
tree703a7744d30b532b56abd14b0ef4c8567638c4c0 /src/nickserv.c
parent59f3a38ffd13b9fa2d31b89efa7558f4919c810b (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
Diffstat (limited to 'src/nickserv.c')
-rw-r--r--src/nickserv.c11
1 files changed, 8 insertions, 3 deletions
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;