1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 16:13:12 +02:00

Fix not updating last_seen on expire nick for nicks with secure off. Don't show Expires in /ns info if the nick is online currently as it confuses people

This commit is contained in:
Adam
2013-09-19 12:38:28 -04:00
parent 98bae827e1
commit 5ce90ba7d1
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -42,7 +42,10 @@ class CommandNSInfo : public Command
/* Is the real owner of the nick we're looking up online? -TheShadow */
User *u2 = User::Find(na->nick);
if (u2 && u2->Account() == na->nc)
{
nick_online = true;
na->last_seen = Anope::CurTime;
}
if (has_auspex || na->nc == source.GetAccount())
show_hidden = true;
+2 -2
View File
@@ -497,7 +497,7 @@ class NickServCore : public Module, public NickServService
++it;
User *u = User::Find(na->nick);
if (u && (na->nc->HasExt("NS_SECURE") ? u->IsIdentified(true) : u->IsRecognized()))
if (u && (u->IsIdentified(true) || u->IsRecognized()))
na->last_seen = Anope::CurTime;
bool expire = false;
@@ -521,7 +521,7 @@ class NickServCore : public Module, public NickServService
if (!na->nc->HasExt("UNCONFIRMED"))
{
time_t nickserv_expire = Config->GetModule(this)->Get<time_t>("expire");
if (!na->HasExt("NS_NO_EXPIRE") && nickserv_expire && !Anope::NoExpire)
if (!na->HasExt("NS_NO_EXPIRE") && nickserv_expire && !Anope::NoExpire && na->last_seen != Anope::CurTime)
info[_("Expires")] = Anope::strftime(na->last_seen + nickserv_expire);
}
else