diff options
author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-05-06 06:15:18 +0000 |
---|---|---|
committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-05-06 06:15:18 +0000 |
commit | dcb587f4ca47ba471e4f3f9ee2545fbeb82fa56f (patch) | |
tree | 5d0346204c1455639f7772cffd1ce7a8d359e4de /src/chanserv.c | |
parent | 4b55c527516069dcae31cb06dba1c60b697eb465 (diff) |
BUILD : 1.7.9 (781) BUGS : 358 364 NOTES : Changed chan_set_correct_modes() to allow identified founders to get founder is SECUREFOUNDER is on. Added code in delchan() to logout people identified as founder to the channel dropped.
git-svn-id: svn://svn.anope.org/anope/trunk@781 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@541 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/chanserv.c')
-rw-r--r-- | src/chanserv.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/chanserv.c b/src/chanserv.c index 52b22f8fd..70643e7d6 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -1933,6 +1933,8 @@ int delchan(ChannelInfo * ci) { int i; NickCore *nc; + User *u; + struct u_chaninfolist *cilist, *cilist_next; if (!ci) { if (debug) { @@ -1975,6 +1977,34 @@ int delchan(ChannelInfo * ci) alog("debug: delchan() rdb done"); } #endif + if (debug >= 2) { + alog("debug: delchan() founder cleanup"); + } + for (i = 0; i < 1024; i++) { + for (u = userlist[i]; u; u = u->next) { + cilist = u->founder_chans; + while (cilist) { + cilist_next = cilist->next; + if (cilist->chan == ci) { + if (debug) + alog("debug: Dropping founder login of %s for %s", + u->nick, ci->name); + if (cilist->next) + cilist->next->prev = cilist->prev; + if (cilist->prev) + cilist->prev->next = cilist->next; + else + u->founder_chans = cilist->next; + free(cilist); + } + cilist = cilist_next; + } + } + } + if (debug >= 2) { + alog("debug: delchan() founder cleanup done"); + } + if (ci->next) ci->next->prev = ci->prev; if (ci->prev) |