mod_lastlog2/README.markdown
author Kim Alvefur <zash@zash.se>
Sun, 03 Mar 2024 11:23:40 +0100
changeset 5857 97c9b76867ca
parent 4016 fd582067c732
child 5880 c5df6d53f17f
permissions -rw-r--r--
mod_log_ringbuffer: Detach event handlers on logging reload (thanks Menel) Otherwise the global event handlers accumulate, one added each time logging is reoladed, and each invocation of the signal or event triggers one dump of each created ringbuffer.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1807
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1786
diff changeset
     1
---
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1786
diff changeset
     2
labels:
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1786
diff changeset
     3
- 'Stage-Beta'
4016
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
     4
summary: Record last timestamp of events
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
     5
---
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
     6
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
     7
# Introduction
1786
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     8
4016
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
     9
Similar to [mod_lastlog], this module records the last timestamp of
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
    10
various events, but keeps the last timestamp per type of event, instead
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
    11
of the last event.
1786
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    12
4016
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
    13
# Usage
1786
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    14
1807
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1786
diff changeset
    15
As with all modules, copy it to your plugins directory and then add it
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1786
diff changeset
    16
to the modules\_enabled list:
1786
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    17
4016
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
    18
``` {.lua}
1863
4b838e61c68e mod_lastlog/README: Adjust formatting / indentation to help pandoc produce fancy html
Kim Alvefur <zash@zash.se>
parents: 1807
diff changeset
    19
modules_enabled = {
4b838e61c68e mod_lastlog/README: Adjust formatting / indentation to help pandoc produce fancy html
Kim Alvefur <zash@zash.se>
parents: 1807
diff changeset
    20
  -- other modules
4016
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
    21
  "lastlog2",
1863
4b838e61c68e mod_lastlog/README: Adjust formatting / indentation to help pandoc produce fancy html
Kim Alvefur <zash@zash.se>
parents: 1807
diff changeset
    22
}
4b838e61c68e mod_lastlog/README: Adjust formatting / indentation to help pandoc produce fancy html
Kim Alvefur <zash@zash.se>
parents: 1807
diff changeset
    23
```
1786
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    24
4016
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
    25
# Configuration
1786
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    26
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    27
There are some options you can add to your config file:
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    28
4016
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
    29
  Name                   Type      Default   Description
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
    30
  ---------------------- --------- --------- ---------------------------------
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
    31
  lastlog\_ip\_address   boolean   false     Log the IP address of the user?
1786
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    32
4016
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
    33
# Usage
1786
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    34
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    35
You can check a user's last activity by running:
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    36
1863
4b838e61c68e mod_lastlog/README: Adjust formatting / indentation to help pandoc produce fancy html
Kim Alvefur <zash@zash.se>
parents: 1807
diff changeset
    37
    prosodyctl mod_lastlog username@example.com
1786
29f3d6b7ad16 Import wiki pages
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    38
4016
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
    39
# Compatibility
1807
4d73a1a6ba68 Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents: 1786
diff changeset
    40
4016
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
    41
  Version   State
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
    42
  --------- -------
fd582067c732 mod_lastlog2: Store last timestamp per account event
Kim Alvefur <zash@zash.se>
parents: 3121
diff changeset
    43
  Any       *TBD*