afk
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.
The plugin also lets you adda a button to rejoin the game for new players who may be confused with the spectator mode.
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'
Configuration
-
AFK Duration Allowed: Duration players can stay inactive until they are declared AFK, in seconds. [Default: 120]
-
AFK Check Frequency: Time to wait before querying a player's inputs again, in ms. Lower values may impact performance. [Default: 1000]
-
AFK Wait: Time to wait before checking again whether a player is AFK, in seconds. [Default: 10]
-
Display AFK Message: If this setting is enabled, a message will be displayed when a player is moved to spectator. [Default: True]
-
AFK Message: Message to display when a player is moved to spectator. Use
{nickname}to insert the player's nickname. [Default:{nickname}$z has been moved to spectator due to inactivity.] -
Display Rejoin Button: If this setting is enabled, players in spectator mode will see a "Rejoin Game" button at the center of the screen.
Changelog
0.7.2
- Renamed plugin
0.7.1
- Moved position of rejoin button and added icon
0.7.0
- Added a rejoin button that displays for players in spectator mode
- Added a setting to disable the rejoin button
0.6.0
- Removed Grace Period/Timeout Delay settings in favor of a single AFK Wait setting
- Added Display AFK Message setting
- Added AFK Message setting
- Refactored AFK checking code and removed some checks (PendingEvents, UISequence)
Metadata
Release files for pyplanet-afk-spec 0.7.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyplanet_afk_spec-0.7.2.tar.gz | 4.8 kB | Without provenance | Details for pyplanet_afk_spec-0.7.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyplanet_afk_spec-0.7.2-py3-none-any.whl | Python 3 | none | any | Details for pyplanet_afk_spec-0.7.2-py3-none-any.whl |
Total release size: 11.0 kB
Release files / pyplanet_afk_spec-0.7.2.tar.gz
| Download URL | pyplanet_afk_spec-0.7.2.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e640514c4233c0bcc62a5be36cc3d82909f8587655f4346cd223424a73ade13
|
|
BLAKE2b-256 checksum How to use checksums |
17c5c30cb3c9c0558ed9665c99e2cb296b6d07020484627c1fb1cb064b518e15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.5
|
Release files / pyplanet_afk_spec-0.7.2-py3-none-any.whl
| Download URL | pyplanet_afk_spec-0.7.2-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e811520ddefd88b69a5d302a79e19222e6a9849c9c86e76b15e3240d6dd0ce47
|
|
BLAKE2b-256 checksum How to use checksums |
ee1ddc54c6cc49bbb923be2795526d8e7fc37a3cd6e3bfa47e984dcc2393c419
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.5
|
Security for pyplanet-afk-spec 0.7.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.