Skip to main content

A Pyplanet server controller plugin to automatically move players to spectator mode if they are AFK.

Project description

afk_spec

PyPlanet plugin to detect AFK players and move them into spectator mode.

This plugin works by repeatedly querying the player's inputs and checking if the player is currently steering, braking or pressing the gas pedal. If the player is found not to be pressing any inputs for a configurable period of time, they are considered AFK and moved to spectator.

Installation

python -m pip install --upgrade pyplanet-afk-spec

Then open settings/apps.py with a text editor and append to the list in 'default':

'feor.afk_spec'

Configuration

  • AFK Timeout: Duration players can stay inactive until they are declared AFK, in seconds. [Default: 120]

  • AFk Check Frequency: Time to wait before checking again whether a player is AFK, in seconds. [Default: 10]

  • Afk Grace Period: Time to wait before checking again whether a player is AFK again if they have been confirmed not to be AFK, in seconds. [Default: 30]

  • AFK Delay: Time to wait before querying a player's inputs again, in ms. Lower values may impact performance. [Default: 1000]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyplanet_afk_spec-0.5.3.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyplanet_afk_spec-0.5.3-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file pyplanet_afk_spec-0.5.3.tar.gz.

File metadata

  • Download URL: pyplanet_afk_spec-0.5.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.5

File hashes

Hashes for pyplanet_afk_spec-0.5.3.tar.gz
Algorithm Hash digest
SHA256 2fbfbc7a87d5ebafe237010f3b1099b85c152b56fbbd33ad785cea1ff31ff9f7
MD5 2cdc8f1f058a0220ea73c75416c03264
BLAKE2b-256 d953ad085a76d1bdeedf794fb7f883b95c50892d1b2449a31b63a2c7a6ee577d

See more details on using hashes here.

File details

Details for the file pyplanet_afk_spec-0.5.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pyplanet_afk_spec-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 98a82c1c0079ce97d03be904f7364469fbc12a12d47684a1681788428c6d0c33
MD5 5b832b4496f7d623f78d11e4619b2cc2
BLAKE2b-256 37ac870932cf65c89ec1cce4e83b4b962543ca7869dbd382c20b754a38b198c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page