Raised This Month: $32 Target: $400
 8% 

[ANY] Auto-Kick Protector


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Spartan_C001
Senior Member
Join Date: Jul 2013
Plugin ID:
3849
Plugin Version:
1.4
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    3 
    Plugin Description:
    Protects certain players/admins from being auto-kicked for afk.
    Old 08-22-2013 , 13:22   [ANY] Auto-Kick Protector
    Reply With Quote #1

    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)!
    Attached Files
    File Type: sp Get Plugin or Get Source (AutoKickProtector.sp - 1798 views - 2.8 KB)

    Last edited by Spartan_C001; 09-26-2013 at 04:22.
    Spartan_C001 is offline
    Spartan_C001
    Senior Member
    Join Date: Jul 2013
    Old 09-03-2013 , 05:44   Re: [ANY] Auto-Kick Protection
    Reply With Quote #2

    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 is offline
    Spartan_C001
    Senior Member
    Join Date: Jul 2013
    Old 09-03-2013 , 06:05   Re: [ANY] Auto-Kick Protection
    Reply With Quote #3

    Version 1.2;
    -Added cvar to set flag for who can use the command
    -Added command for admins to manually protect other clients.
    Spartan_C001 is offline
    Maxximou5
    AlliedModders Donor
    Join Date: Feb 2013
    Old 09-03-2013 , 06:06   Re: [ANY] Auto-Kick Protection
    Reply With Quote #4

    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.
    Maxximou5 is offline
    Spartan_C001
    Senior Member
    Join Date: Jul 2013
    Old 09-03-2013 , 06:18   Re: [ANY] Auto-Kick Protection
    Reply With Quote #5

    Quote:
    Originally Posted by Maxximou5 View Post
    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 i just updated it to a further version (added command and stuff) as you posted that.

    Last edited by Spartan_C001; 09-03-2013 at 07:41.
    Spartan_C001 is offline
    samsah
    AlliedModders Donor
    Join Date: Mar 2008
    Location: Finland
    Old 09-09-2013 , 06:41   Re: [ANY] Auto-Kick Protector
    Reply With Quote #6

    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
    __________________
    samsah is offline
    Spartan_C001
    Senior Member
    Join Date: Jul 2013
    Old 09-09-2013 , 10:55   Re: [ANY] Auto-Kick Protector
    Reply With Quote #7

    Quote:
    Originally Posted by samsah View Post
    Getting this with TF2
    Will investigate asap

    EDIT: Fixed! Check main post for updated version

    Last edited by Spartan_C001; 09-09-2013 at 11:24.
    Spartan_C001 is offline
    Maxximou5
    AlliedModders Donor
    Join Date: Feb 2013
    Old 09-21-2013 , 14:32   Re: [ANY] Auto-Kick Protector
    Reply With Quote #8

    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.

    Last edited by Maxximou5; 09-21-2013 at 14:36.
    Maxximou5 is offline
    Spartan_C001
    Senior Member
    Join Date: Jul 2013
    Old 09-24-2013 , 10:01   Re: [ANY] Auto-Kick Protector
    Reply With Quote #9

    Quote:
    Originally Posted by Maxximou5 View Post
    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 is offline
    Spartan_C001
    Senior Member
    Join Date: Jul 2013
    Old 09-24-2013 , 10:07   Re: [ANY] Auto-Kick Protection
    Reply With Quote #10

    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.
    Spartan_C001 is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 13:22.


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