From 672acf306f16d9b100db6aa0fa32b1eab85bfb9e Mon Sep 17 00:00:00 2001 From: sjaz Date: Wed, 6 May 2009 07:52:57 +0000 Subject: [PATCH] Patch from DukeP - founderstatus (gained by /cs identify) is not removed on logout, and on remote logout the nicktracking and the timers are removed from the wrong user (u instead of u2). Cheers! :) git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2293 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/ns_logout.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/core/ns_logout.c b/src/core/ns_logout.c index c65db262e..02ab49a41 100644 --- a/src/core/ns_logout.c +++ b/src/core/ns_logout.c @@ -73,6 +73,7 @@ int do_logout(User * u) { char *nick = strtok(NULL, " "); char *param = strtok(NULL, " "); + struct u_chaninfolist *ci, *ci2; User *u2; if (!is_services_admin(u) && nick) { @@ -111,14 +112,23 @@ int do_logout(User * u) else notice_lang(s_NickServ, u, NICK_LOGOUT_SUCCEEDED); + /* remove founderstatus from this user in all channels */ + ci = u2->founder_chans; + while (ci) { + ci2 = ci->next; + free(ci); + ci = ci2; + } + u->founder_chans = NULL; + + /* Stop nick tracking if enabled */ if (NSNickTracking) - /* Shouldn't this be u2? -GD */ - nsStopNickTracking(u); + nsStopNickTracking(u2); /* Clear any timers again */ - if (u->na->nc->flags & NI_KILLPROTECT) { - del_ns_timeout(u->na, TO_COLLIDE); + if (u2->na->nc->flags & NI_KILLPROTECT) { + del_ns_timeout(u2->na, TO_COLLIDE); } /* Send out an event */