diff options
author | Adam <Adam@anope.org> | 2011-03-05 22:00:27 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-03-05 22:00:27 -0500 |
commit | 48e6221cf0f2592b85ef220876435b966b6a49ed (patch) | |
tree | 163d9254562e88fd3891451782d5120b1a122565 /src | |
parent | ef0c0957126dea31eb1ee5acf28b6d9f6833b60c (diff) |
Expire unconfirmed nicks, forgot to add this earlier..
Diffstat (limited to 'src')
-rw-r--r-- | src/nickalias.cpp | 2 | ||||
-rw-r--r-- | src/nickserv.cpp | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/nickalias.cpp b/src/nickalias.cpp index b82e27ce6..3c8af1142 100644 --- a/src/nickalias.cpp +++ b/src/nickalias.cpp @@ -49,7 +49,7 @@ NickAlias::~NickAlias() /* Second thing to do: look for a user using the alias * being deleted, and make appropriate changes */ User *u = finduser(this->nick); - if (u && u->Account()) + if (u && u->Account() == this->nc) { ircdproto->SendAccountLogout(u, u->Account()); u->RemoveMode(NickServ, UMODE_REGISTERED); diff --git a/src/nickserv.cpp b/src/nickserv.cpp index e12673d08..aed4cc973 100644 --- a/src/nickserv.cpp +++ b/src/nickserv.cpp @@ -242,14 +242,18 @@ void expire_nicks() ++it; User *u = finduser(na->nick); - if (u && (na->nc->HasFlag(NI_SECURE) ? u->IsIdentified() : u->IsRecognized())) + if (u && (na->nc->HasFlag(NI_SECURE) ? u->IsIdentified(true) : u->IsRecognized(true))) { Log(LOG_DEBUG_2) << "NickServ: updating last seen time for " << na->nick; na->last_seen = Anope::CurTime; - continue; } bool expire = false; + + if (na->nc->HasFlag(NI_UNCONFIRMED)) + if (Config->NSUnconfirmedExpire && Anope::CurTime - na->time_registered >= Config->NSUnconfirmedExpire) + expire = true; + if (na->nc->HasFlag(NI_SUSPENDED)) { if (Config->NSSuspendExpire && Anope::CurTime - na->last_seen >= Config->NSSuspendExpire) |