Dostlar STUDIO / Archive / AFK Guard

AFK Guard

Idle player kick · Server management

ShelvedFS25_AFKGuard

On a busy server the slots fill up with players nobody is sitting behind: newcomers cannot get in and the idle ones never leave. AFK Guard watches input, and everything counts as activity and resets the timer: keyboard, mouse, gamepad sticks and buttons, input inside menus as well. If nothing arrives within the configured time the player gets an “Are you there?” panel; if they do not answer within the confirmation window the client is sent back to the main menu, which means leaving the server. If the panel cannot be shown or no way out can be found, nobody is dropped and the mod goes back to watching.

Status: Shelved. Active development is paused for now, but the mod still gets an occasional update.

Features

What it does

  • Idle limit (1-240 minutes) and confirmation window (10-600 seconds) are configurable; 10 minutes and 60 seconds by default.
  • Any input resets the timer: gamepad sticks and buttons, mouse and keyboard input inside menus included.
  • Closing the panel by hand also counts as being present.
  • Only runs on multiplayer clients; disabled in the dedicated server process and for the hosting player.
  • If the panel cannot open or no route back to the main menu is found, nobody is dropped.
  • The disconnect runs on the next frame through the same path as the menu's own Quit button, so no black screen is left after an AFK disconnect.
  • Settings live in the server's modSettings/FS25_AFKGuard.xml: idle limit, confirmation window and the on/off switch are read on the server and sent to each player on joining. A player's own file cannot change them or switch the mod off.
  • If the server's settings do not arrive, the player asks twice more; if they still do not arrive, AFK watching stays off for that session and a warning is written to log.txt.
  • A test switch runs the whole flow in singleplayer, a debug switch draws the live state on screen. These two stay local to each computer.

Setup

How to use it

  1. Put the zip into the server's mods folder; players download it automatically.
  2. Set the timings in the server's modSettings/FS25_AFKGuard.xml; the values are sent to players automatically. The file is created with defaults on first run.
  3. No key binding needed. The panel opens on its own.