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/nickserv.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/nickserv.c')
-rw-r--r-- | src/nickserv.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/nickserv.c b/src/nickserv.c index 8f4ceea1b..a0994e07d 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -58,7 +58,7 @@ void NickServCollide::Tick(time_t ctime) { /* If they identified or don't exist anymore, don't kill them. */ User *u = finduser(na->nick); - if (!u || u->nc == na->nc || u->my_signon > this->GetSetTime()) + if (!u || u->Account() == na->nc || u->my_signon > this->GetSetTime()) return; /* The RELEASE timeout will always add to the beginning of the @@ -380,20 +380,6 @@ void cancel_user(User * u) /*************************************************************************/ -/* Return whether a user has identified for their nickname. */ - -int nick_identified(User * u) -{ - if (u->nc) - { - return 1; - } - - return 0; -} - -/*************************************************************************/ - /* Remove all nicks which have expired. Also update last-seen time for all * nicks. */ @@ -412,7 +398,7 @@ void expire_nicks() next = na->next; User *u = finduser(na->nick); - if (u && (na->nc->HasFlag(NI_SECURE) ? nick_identified(u) : u->IsRecognized())) + if (u && (na->nc->HasFlag(NI_SECURE) ? u->IsIdentified() : u->IsRecognized())) { Alog(LOG_DEBUG_2) << "NickServ: updating last seen time for " << na->nick; na->last_seen = now; |