diff options
author | adam- <adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-07-06 17:43:30 +0000 |
---|---|---|
committer | adam- <adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-07-06 17:43:30 +0000 |
commit | 1d53afee3f81a05296741e8f6cbb5665a7c6db8e (patch) | |
tree | 91a6acf251197ea5bb08fb22bb80c53f253dc9a2 /src | |
parent | d75238496b4ba31d9b348f54c9d34c7ac2beb020 (diff) |
Remove channel founder status from users who logout
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2363 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ns_logout.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/ns_logout.c b/src/core/ns_logout.c index 8b5310084..f51a553d1 100644 --- a/src/core/ns_logout.c +++ b/src/core/ns_logout.c @@ -31,6 +31,7 @@ class CommandNSLogout : public Command const char *param = params.size() > 1 ? params[1].c_str() : NULL; User *u2; NickAlias *na; + struct u_chaninfolist *ci, *ci2; if (!u->nc->IsServicesOper() && nick) this->OnSyntaxError(u); @@ -63,6 +64,16 @@ class CommandNSLogout : public Command u2->isSuperAdmin = 0; /* Dont let people logout and remain a SuperAdmin */ alog("%s: %s!%s@%s logged out nickname %s", s_NickServ, u->nick, u->GetIdent().c_str(), u->host, u2->nick); + /* Remove founder status from this user in all channels */ + ci = u2->founder_chans; + while (ci) + { + ci2 = ci->next; + delete ci; + ci = ci2; + } + u2->founder_chans = NULL; + if (nick) notice_lang(s_NickServ, u, NICK_LOGOUT_X_SUCCEEDED, nick); else |