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_info.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_info.c')
-rw-r--r-- | src/core/ns_info.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/ns_info.c b/src/core/ns_info.c index 230597637..7243a4c44 100644 --- a/src/core/ns_info.c +++ b/src/core/ns_info.c @@ -56,11 +56,11 @@ class CommandNSInfo : public Command if ((nr = findrequestnick(nick))) { notice_lang(Config.s_NickServ, u, NICK_IS_PREREG); - if (!param.empty() && param == "ALL" && u->nc && u->nc->IsServicesOper()) + if (!param.empty() && param == "ALL" && u->Account() && u->Account()->IsServicesOper()) notice_lang(Config.s_NickServ, u, NICK_INFO_EMAIL, nr->email); else { - if (u->nc && u->nc->IsServicesOper()) + if (u->Account() && u->Account()->IsServicesOper()) notice_lang(Config.s_NickServ, u, NICK_INFO_FOR_MORE, Config.s_NickServ, nr->nick); } } @@ -86,12 +86,12 @@ class CommandNSInfo : public Command /* Is the real owner of the nick we're looking up online? -TheShadow */ User *u2 = finduser(na->nick); - if (u2 && u2->nc == na->nc) + if (u2 && u2->Account() == na->nc) nick_online = 1; /* Only show hidden fields to owner and sadmins and only when the ALL * parameter is used. -TheShadow */ - if (!param.empty() && param == "ALL" && u->nc && (na->nc == u->nc || u->nc->IsServicesOper())) + if (!param.empty() && param == "ALL" && u->Account() && (na->nc == u->Account() || u->Account()->IsServicesOper())) show_hidden = 1; notice_lang(Config.s_NickServ, u, NICK_INFO_REALNAME, na->nick, na->last_realname); @@ -172,7 +172,7 @@ class CommandNSInfo : public Command notice_lang(Config.s_NickServ, u, NICK_INFO_NO_EXPIRE); else { - if (u->nc->IsServicesOper()) + if (u->Account()->IsServicesOper()) { expt = na->last_seen + Config.NSExpire; tm = localtime(&expt); @@ -182,7 +182,7 @@ class CommandNSInfo : public Command } } - if (!show_hidden && u->nc && (na->nc == u->nc || u->nc->IsServicesOper())) + if (!show_hidden && u->Account() && (na->nc == u->Account() || u->Account()->IsServicesOper())) notice_lang(Config.s_NickServ, u, NICK_INFO_FOR_MORE, Config.s_NickServ, na->nick); } return MOD_CONT; @@ -190,7 +190,7 @@ class CommandNSInfo : 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_INFO); else notice_help(Config.s_NickServ, u, NICK_HELP_INFO); |