AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Auto-Kick Protector (https://forums.alliedmods.net/showthread.php?t=224305)

Spartan_C001 08-22-2013 13:22

[ANY] Auto-Kick Protector
 
9 Attachment(s)
Auto-Kick Protector

Purpose
-Protects players with a given flag from being kicked due to being AFK.
-Admins, as i know, will come across hackers whom they may need to stay in spectate for a while to watch them for suspicious activity. This protects them from getting kicked for being AFK, as they may appear so.

Commands
-sm_autokick_protector_manual <#userid|name> - Command to manually enable protection for targeted client (Access to this command is defined by cvar "sm_autokick_protector_manual_flag" - Default 'b' Generic access).

ConVars
-sm_autokick_protector_version - Plugin Version, leave this alone!
-sm_autokick_protector_flag - Admin flag to protect (Default 'a' - Reserved Slot).
-sm_autokick_protector_manual_flag = Admin flag to be able to use command (Default 'b' - Generic).

How to use
-Compile and install AutoKickProtector.smx into <game>/addons/sourcemod/plugins/
-Load plugin (Will auto load next map, or you may do it manually via a restart or other method).
-Configure convars in "<game>/cfg/sourcemod/plugin.autokickprotector.cfg".
-Play!

Notes
-Root Admins have FULL ACCESS with this plugin; meaning they are always protected and can always use the manual command.

ToDo's
-None (yet)... Suggest something!

Changelog
-1.0 Initial plugin!
-1.1 Fixed client is not in game error if plugin was late loaded, also no longer checks bots if late loaded.
-1.2 Added manual command and cvar to set access to the command.
-1.3 Fixed convar handle errors (typo)
-1.4 Fixed the fix for 1.3 (updating from 1.3 is important)!

Spartan_C001 09-03-2013 05:44

Re: [ANY] Auto-Kick Protection
 
Version 1.1;
-Fixed client is not in game errors when plugin was loaded late.
-No longer checks bots for admin permissions (do bots even get kicked anyway?).

Spartan_C001 09-03-2013 06:05

Re: [ANY] Auto-Kick Protection
 
Version 1.2;
-Added cvar to set flag for who can use the command
-Added command for admins to manually protect other clients.

Maxximou5 09-03-2013 06:06

Re: [ANY] Auto-Kick Protection
 
Now this is a must have plugin, if only this feature was already embedded in Sourcemod. Something for future versions. So many times I've gone away from the game to check server logs, only to come back to to that dreadful message of being kicked. Good work my friend, and thank you.

Spartan_C001 09-03-2013 06:18

Re: [ANY] Auto-Kick Protection
 
Quote:

Originally Posted by Maxximou5 (Post 2027445)
Now this is a must have plugin, if only this feature was already embedded in Sourcemod. Something for future versions. So many times I've gone away from the game to check server logs, only to come back to to that dreadful message of being kicked. Good work my friend, and thank you.

Thanks :D i just updated it to a further version (added command and stuff) as you posted that.

samsah 09-09-2013 06:41

Re: [ANY] Auto-Kick Protector
 
Quote:

L 09/09/2013 - 13:17:48: [SM] Native "GetConVarString" reported: Invalid convar handle 0 (error 4)
L 09/09/2013 - 13:17:48: [SM] Displaying call stack trace for plugin "AutoKickProtector.smx":
L 09/09/2013 - 13:17:48: [SM] [0] Line 46, /home/groups/alliedmodders/forums/files/2/3/2/7/2/7/124633.attach::OnClientPostAdminCheck()
Getting this with TF2

Spartan_C001 09-09-2013 10:55

Re: [ANY] Auto-Kick Protector
 
Quote:

Originally Posted by samsah (Post 2031264)
Getting this with TF2

Will investigate asap :)

EDIT: Fixed! Check main post for updated version

Maxximou5 09-21-2013 14:32

Re: [ANY] Auto-Kick Protector
 
Receiving this error: [SM] Warning: Invalid flag supplied in 'sm_disable_autokick_flag'. Using default (a).
Spoiler


Note: You never declared sm_disable_autokick_flag as a ConVar. Line: 46-49 in sp.

Spartan_C001 09-24-2013 10:01

Re: [ANY] Auto-Kick Protector
 
Quote:

Originally Posted by Maxximou5 (Post 2038593)
Receiving this error: [SM] Warning: Invalid flag supplied in 'sm_disable_autokick_flag'. Using default (a).
Spoiler


Note: You never declared sm_disable_autokick_flag as a ConVar. Line: 46-49 in sp.

That was a typo i made when changing the code, i originally had the ConVars as sm_disable_autokick_* but they were too similar to the server command mp_disable_autokick so i changed them to sm_autokick_protector_*.

Fixed now, it was only the PrintToServer that was not correctly changed. I have also changed it to ReplyToCommand when using the manual command instead of just printing to the server if there was an error with the convar.

Spartan_C001 09-24-2013 10:07

Re: [ANY] Auto-Kick Protection
 
Version 1.4;
-Fixes typos in the PrintToServers and ReplyToCommands
-Replies to user of command if an invalid flag is used.

Please note if you supply multiple flags in any of the flag ConVars the plugin will use the first flag you supplied. e.g; "ab" would just use "a" flag. An invalid flag such as "y" would result in a reply from the server.


All times are GMT -4. The time now is 00:34.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.