diff --git a/app/Classes/Node.php b/app/Classes/Node.php index be9669e..e8adaab 100644 --- a/app/Classes/Node.php +++ b/app/Classes/Node.php @@ -159,8 +159,11 @@ class Node // If we have challenge, then we are doing MD5 $exp_pwd = $challenge ? $this->md5_challenge($o->session('sespass'),$challenge) : $o->session('sespass'); - if ($exp_pwd === $password) + if ($exp_pwd === $password) { + $o->system->last_session = Carbon::now(); + $o->system->save(); $this->ftns_authed->push($o); + } } Log::debug(sprintf('%s: = End [%d]',__METHOD__,$this->ftns_authed->count())); @@ -227,7 +230,11 @@ class Node $ftn = $this->ftns_authed->first()->ftn; return $this->ftns->search(function($item) use ($ftn) { - return $item->ftn == $ftn; + if ($item->ftn == $ftn) { + $item->system->last_session = Carbon::now(); + $item->system->save(); + return TRUE; + } }) !== FALSE; } diff --git a/app/Classes/Protocol/Binkp.php b/app/Classes/Protocol/Binkp.php index ffcfc86..c6c7984 100644 --- a/app/Classes/Protocol/Binkp.php +++ b/app/Classes/Protocol/Binkp.php @@ -1027,6 +1027,8 @@ final class Binkp extends BaseProtocol } /** + * Remote accepted our password + * * @throws Exception */ private function M_ok(string $buf): int diff --git a/app/Models/System.php b/app/Models/System.php index a8b5b1d..8a3debf 100644 --- a/app/Models/System.php +++ b/app/Models/System.php @@ -12,6 +12,8 @@ class System extends Model { use HasFactory,ScopeActive; + protected $dates = ['last_session']; + /* RELATIONS */ public function addresses() diff --git a/resources/views/domain/view.blade.php b/resources/views/domain/view.blade.php index 8fa90c7..1e53b11 100644 --- a/resources/views/domain/view.blade.php +++ b/resources/views/domain/view.blade.php @@ -74,7 +74,7 @@