diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-02-04 23:49:27 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-02-04 23:49:27 +0000 |
commit | 308070e01971b0cfaf77de20011f48ce4d6b5a1c (patch) | |
tree | 2bdfd84e35cf79eb20dc2a79ddd233789ca84fdf /src/core/ns_logout.c | |
parent | 3d4cf39940144be19645a3a7cdecf95213b96f26 (diff) |
We now store a list of users using a NickCore in the NickCore, this prevents having to loop every user all the time to find them
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2780 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/ns_logout.c')
-rw-r--r-- | src/core/ns_logout.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/ns_logout.c b/src/core/ns_logout.c index c36c46615..fcb14fb8e 100644 --- a/src/core/ns_logout.c +++ b/src/core/ns_logout.c @@ -32,11 +32,11 @@ class CommandNSLogout : public Command User *u2; NickAlias *na; - if (!u->nc->IsServicesOper() && nick) + if (!u->Account()->IsServicesOper() && nick) this->OnSyntaxError(u, ""); else if (!(u2 = (nick ? finduser(nick) : u))) notice_lang(Config.s_NickServ, u, NICK_X_NOT_IN_USE, nick); - else if (nick && u2->nc && !u2->nc->IsServicesOper()) + else if (nick && u2->Account() && !u2->Account()->IsServicesOper()) notice_lang(Config.s_NickServ, u, NICK_LOGOUT_SERVICESADMIN, nick); else { @@ -58,13 +58,13 @@ class CommandNSLogout : public Command notice_lang(Config.s_NickServ, u, NICK_LOGOUT_SUCCEEDED); /* Clear any timers again */ - if (na && u->nc->HasFlag(NI_KILLPROTECT)) + if (na && u->Account()->HasFlag(NI_KILLPROTECT)) del_ns_timeout(na, TO_COLLIDE); - ircdproto->SendAccountLogout(u2, u2->nc); + ircdproto->SendAccountLogout(u2, u2->Account()); ircdproto->SendUnregisteredNick(u2); - u2->nc = NULL; + u2->Logout(); /* Send out an event */ FOREACH_MOD(I_OnNickLogout, OnNickLogout(u2)); @@ -74,7 +74,7 @@ class CommandNSLogout : public Command bool OnHelp(User *u, const ci::string &subcommand) { - if (u->nc && u->nc->IsServicesOper()) + if (u->Account() && u->Account()->IsServicesOper()) notice_help(Config.s_NickServ, u, NICK_SERVADMIN_HELP_LOGOUT); else notice_help(Config.s_NickServ, u, NICK_HELP_LOGOUT); |