Skip to content

AFK Plugin

Detects and handles AFK (away from keyboard) players by monitoring activity.

Plugin name: afkRequires config: Yes

Behavior

  • Tracks last activity time per player (chat, kills, damage)
  • Periodically checks for inactive players
  • Only enforces when min_players are connected
  • Can move to spectator first or kick directly

Settings

toml
[[plugins]]
name = "afk"
enabled = true

[plugins.settings]
afk_threshold_secs = 300
min_players = 4
check_interval_secs = 60
move_to_spec = true
afk_message = "^7AFK: You have been inactive too long"
SettingTypeDefaultDescription
afk_threshold_secsinteger300Seconds of inactivity before considered AFK
min_playersinteger4Minimum player count before AFK enforcement activates
check_interval_secsinteger60How often to check for AFK players (seconds)
move_to_specbooltrueMove to spectator first (false = kick directly)
afk_messagestringSee aboveMessage shown to AFK players

Events

EVT_CLIENT_SAY, EVT_CLIENT_TEAM_SAY, EVT_CLIENT_KILL, EVT_CLIENT_DAMAGE, EVT_CLIENT_DISCONNECT, EVT_GAME_ROUND_START

Released under the GPL-2.0 License.