The AFK-Utils plugin provides the framework with information on users afk status.
It provides an API of events that will inform listeners of changes in AFK states with the respective reason for the change.
It can optionally move clients who are afk to a configured channel (by server group) and will also try to move them back once they are no longer afk.

Example configuration

Available config keys:

  • channels the AFK move targets.
    • groups server groups to be moved to this channel
    • priority when a client matches multiple channels, the one with the highest is chosen
  • idle_times Mapping on what server group will be considered as afk after how many secods of idle time (corresponds to the TS3 idle time value)
    • When a client matches multiple, the highest is chosen
  • output_muted_divisor Max idle time divisor for when the speakers are muted (use 1 to disable)
  • both_muted_divisor Max idle time divisor for when both speakers and mic are muted (use 1 to disable)
  • channel_blacklist which channels will not be monitored
  • channel_whitelist which channels will be the only being monitored
  • idle_warn_time threshold of remaining time below which the plugin will send a text message warning to the client (on each check!)
  • idle_warn_message warn message to send the client. Use %[time] to insert the approximate remaining idle time.
{
    "channels": {
        "235": {
            "comment": "AFK-Team",
            "groups": [81, 85, 86, 87, 88, 89, 90, 91, 92],
            "priority": 999
        },
        "51": {
            "comment": "AFK-Everyone",
            "groups": [],
            "priority": 1
        },
        "108": {
            "comment": "Musikbot-Storage",
            "groups": [95],
            "priority": 50
        }
    },
    "idle_times": {
        "comment": "Time after which clients will be considered AFK (in seconds)"
        "default": 1200,
        "94": 900,
        "82": 1400,
        "86": 1400,
        "87": 1400,
        "88": 1400,
        "89": 1400,
        "90": 2400,
        "91": 2400,
        "92": 2400,
        "95": 600,
        "146": -1
    },
    "both_muted_divisor": 2,
    "output_muted_divisor": 2,
    "channel_blacklist": [52, 53],
    "channel_whitelist": [13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],
    "idle_warn_time": 90,
    "idle_warn_message": "If you stay AFK, you will be moved in about %[time] seconds!"
}