summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsjaz <sjaz@5417fbe8-f217-4b02-8779-1006273d7864>2009-05-06 07:52:57 +0000
committersjaz <sjaz@5417fbe8-f217-4b02-8779-1006273d7864>2009-05-06 07:52:57 +0000
commit672acf306f16d9b100db6aa0fa32b1eab85bfb9e (patch)
tree039cf2d1d3202014303f67c3e90530119b5b51e4
parenta408ceee7432c66d5b9d88a25af54ef0c35f8dd1 (diff)
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
-rw-r--r--src/core/ns_logout.c18
1 files 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 */