View Single Post
Author Message
sheo
SourceMod Donor
Join Date: Jul 2013
Location: Russia, Moscow
Old 06-07-2014 , 07:04   [TF2] Play Or Leave - a safer method of detecting AFKs [12/7/2014]
Reply With Quote #1

Description
What, another AFK manager? Not really, this one checks client`s buttons activity rather than checking his world and eye positions every given period of time. This method appears to be much more reliable than that usual one.

What exactly this plugin can do?
Move AFKs to Spectators team; kick AFKs only if the server is almost full; warn players if they will be kicked/moved soon

Cvars:
tf2_sheoafk_manager_version - version cvar
sm_sheoafk_free_slots_before_kick - How many slots should left on the server when AFK manager starts kicking spectators. (def: 4)
sm_sheoafk_seconds_before_spec - How many seconds to wait before spectating an afk player. (def: 60.0)
sm_sheoafk_seconds_before_kick - How many seconds to wait before kicking an afk spectator. This counts from the moment the player joins spectator team. (def: 120.)
sm_sheoafk_seconds_before_warn - How many seconds before kick/spec a player should be warned about oncoming action. (def: 15.0)
sm_sheoafk_ignore_admins - Set to 1 to ignore admins. This does not include the native and forwards, they are working for all players. (def: 0)

Additionally:
The plugin adds some new target filters for other plugins
@afk/@afks - everyone who is marked as AFK
@notafk/@notafks/@active - everyone who is in game and not marked as AFK
Also it provides some useful functions for other plugins. Look into .inc file for more info.

Requirements:
SourceMod 1.5 or higher + translation file (attached)

Installation:
1) Put the plugin to your plugins folder
2) Put afk_manager.txt to your translations folder
3) Set up cvars values in your server.cfg if wanted

Changelog:
Spoiler
Attached Files
File Type: txt afk_manager.txt (859 Bytes, 776 views)
File Type: inc afk_manager.inc (353 Bytes, 586 views)
File Type: sp Get Plugin or Get Source (afk_manager.sp - 1707 views - 11.0 KB)

Last edited by sheo; 08-01-2014 at 00:57.
sheo is offline