Mercurial > prosody-modules
comparison mod_list_active/mod_list_active.lua @ 2640:c06c59b99b3c
mod_list_active: Actually invert condition (thanks Dan)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 22 Mar 2017 17:34:16 +0100 |
| parents | 39c39844cd4c |
| children |
comparison
equal
deleted
inserted
replaced
| 2639:bdedf85a3e2e | 2640:c06c59b99b3c |
|---|---|
| 40 | 40 |
| 41 for user in dm.users(host, "lastlog") do | 41 for user in dm.users(host, "lastlog") do |
| 42 local last_active = dm.load(user, host, "lastlog"); | 42 local last_active = dm.load(user, host, "lastlog"); |
| 43 local last_action = last_active and last_active.event or "?" | 43 local last_action = last_active and last_active.event or "?" |
| 44 last_active = last_active and last_active.timestamp or 0; | 44 last_active = last_active and last_active.timestamp or 0; |
| 45 if last_active < max_age then | 45 if last_active > max_age then |
| 46 print(output:format(jid_join(user, host), last_action)); | 46 print(output:format(jid_join(user, host), last_action)); |
| 47 end | 47 end |
| 48 end | 48 end |
| 49 end | 49 end |
| 50 | 50 |
