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

[T2P] Advanced Free2Play Kicker/Replacer


Post New Thread Reply   
 
Thread Tools Display Modes
Author
speziFanta
Junior Member
Join Date: Nov 2007
Plugin ID:
2442
Plugin Version:
0.0.9
Plugin Category:
Server Management
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allow Free2Play users but replace them by premium users in case the server gets full. (Quickplay support).
    Old 07-19-2011 , 11:07   [T2P] Advanced Free2Play Kicker/Replacer
    Reply With Quote #1

    Goal
    Allow F2P users but block and kick (replace) them by premium users. Keep the server full but always allow premium users to join your server and replace a F2P user.
    In other words: F2P users will acted as a reserved slot for premium users.

    Description
    This plugin will allow Free 2 Play users to join your server only until a certain defined server slot (default 22) and refuses them as soon as this slot limit is reached. If the limit is reached, as long as the server isn't 100% filled by premium users, every new joining premium user will kick the longest playing F2P user until there is no F2P user left to be kicked and the server fills up as normal. In case you are using Qickplay, Quickplay will be automatically disabled (sm_f2p_max - 2) and turned back on as soon as the player count drops to sm_f2p_max - 4.

    In other words: as long as the server is not full, premium users may always join your server.

    Features
    - supports Quickplay
    - supports reserved slots.
    - whitelist F2P accounts via "BypassPremiumCheck" flag. Credits go to Asherkin.
    - F2P users get blocked not kicked, when the server is full. This way there will be no pop-up asking them to blacklist your server.
    - a cvar may disable this plugin restoring Quickplay settings. This is useful when allowing F2P users during night.

    Differences to other plugins:
    - Asherkin's Free2BeKicked: blocks all F2P users
    - Extendet version of Asherkin's Free2BeKicked: has a slot limit, but does not replace F2P users by preimum users. No quickplay consideration.

    ConVars

    sm_f2p_kicker
    Status of Free 2 Play Kicker. If set to 1 it'll be activated (default). 0 is off.

    sm_f2p_max
    Maximum available Free2Play slots before F2P users get blocked on join and replaced afterwards. Default 22.

    Install Instructions
    1. Install SteamTools
    2. Download the source code and place it into addons/sourcemod/scripting
    3. Compile it
    4. Copy the addons/sourcemod/scripting/compiled/sf_f2p_kicker.smx into your addons/sourcemod/plugins/ folder

    Notes
    Credits to Free2BeKicked which this is based on and the #sourcemod IRC

    Changelog
    2011-27-29 (v.0.0.9)
    - added sv_tags handle to disable SM notifications
    - added hock to prevent f2p_max cvar to go over max available public slots
    - removed f2p_max cvar limit
    - fixed quotes on log message
    2011-07-22 (v.0.0.8)
    - added Asherkin to authors
    - added 32 slot support
    - removed hard-coded stuff
    - removed second OnClientPostAdminCheck() check
    - removed debugging infos and cleaned up code
    2011-07-19 (v0.0.7)
    - public release after two weeks of testing
    Attached Files
    File Type: sp Get Plugin or Get Source (sf_f2p_kicker.sp - 590 views - 5.3 KB)

    Last edited by speziFanta; 07-29-2011 at 11:11. Reason: updated to 0.0.9
    speziFanta is offline
    Datenkralle
    Member
    Join Date: Jan 2011
    Old 07-20-2011 , 22:29   Re: [T2P] Advanced Free2Play Kicker/Replacer
    Reply With Quote #2

    Sounds great. 2 in one.
    I hope it worked, so i will use it.
    __________________
    Datenkralle is offline
    Datenkralle
    Member
    Join Date: Jan 2011
    Old 07-23-2011 , 22:50   Re: [T2P] Advanced Free2Play Kicker/Replacer
    Reply With Quote #3

    I have tested it. Not working. All F2P Users are rejected and kicked. Also i set the cvars in server.cfg, like your default settings.
    Steamtools are also installed, and your plugin works, sm plugins list say it so.

    Only these bug exist.

    Behind these plugin is a nice idea, please hold on fixing.
    __________________
    Datenkralle is offline
    speziFanta
    Junior Member
    Join Date: Nov 2007
    Old 07-24-2011 , 07:14   Re: [T2P] Advanced Free2Play Kicker/Replacer
    Reply With Quote #4

    Uh, that should not happen.
    Our server (24 public + 2 reserved slots) runs fine having sm_f2p_max set to 22.

    Here is yesterday's log: http://pastebin.com/N0h15H1m
    Note: Our F2P Kicker only runs from 17 to 24 o'clock. That is the only time were F2P Users get blocked or replaced.

    Datenkralle, what I would ask you to do helping me debugging this issue, could you paste the following results of each command?
    • sm plugins list
    • sm cvars sf_f2p_kicker
    • sm exts list
    • grep "\[F2P\] F2P" *log (in case you have Linux and shell access) otherwise please paste your entire yesterday's log, so I can parse your logs myself
    To seed up this process, you can also contact me via IRC (#sourcemod @ gamesurge.net).
    Thank you for your help and feedback.

    Last edited by speziFanta; 07-24-2011 at 07:35.
    speziFanta is offline
    InsaneOut
    Junior Member
    Join Date: Jul 2011
    Old 07-27-2011 , 21:49   Re: [T2P] Advanced Free2Play Kicker/Replacer
    Reply With Quote #5

    Code:
    02:45:28 sm_f2p_max
    02:45:28 "sm_f2p_max" = "0.000000" ( def. "22" ) min. 0.000000 max. 0.000000
              - Maximum F2P slots before F2P users get blocked on join.
    02:45:53 sm plugins reload 6
    02:45:53 [SM] Plugin F2P Kicker reloaded successfully.
    02:45:57 sm_f2p_max
    02:45:57 "sm_f2p_max" = "0.000000" ( def. "22" ) min. 0.000000 max. 0.000000
              - Maximum F2P slots before F2P users get blocked on join.
    So yeah, gonna have to disable this entirely
    InsaneOut is offline
    asherkin
    SourceMod Developer
    Join Date: Aug 2009
    Location: OnGameFrame()
    Old 07-27-2011 , 22:08   Re: [T2P] Advanced Free2Play Kicker/Replacer
    Reply With Quote #6

    You can force the cvar to go outside the set bounds by using the sm_cvar command.

    To the author: you can't use MaxClients before OnMapStart, so it's setting the max bound to 0 always.
    __________________
    asherkin is offline
    InsaneOut
    Junior Member
    Join Date: Jul 2011
    Old 07-27-2011 , 22:23   Re: [T2P] Advanced Free2Play Kicker/Replacer
    Reply With Quote #7

    Thanks man, that works great! Funny thing is it defaulted to 22 up until a few days ago. Maybe it was the last tf2 update idk
    InsaneOut is offline
    Sillium
    AlliedModders Donor
    Join Date: Sep 2008
    Location: Germany
    Old 07-28-2011 , 04:41   Re: [T2P] Advanced Free2Play Kicker/Replacer
    Reply With Quote #8

    Small addition to your plugin:

    I added a Kicktype (Highest Ping, Highest Time, Lowest Time).
    This is untested since I can't test it here but if you like it you can add it to your plugin.

    This does not resolve the MaxClients issue asherkin mentioned
    Attached Files
    File Type: sp Get Plugin or Get Source (sf_f2p_kicker_with_kicktype.sp - 182 views - 5.9 KB)
    __________________
    brb, dishes have developed their own language and are talking to the garbage about overthrowing me... i must correct this

    www.unterwasserpyromanen.de
    Sillium is offline
    speziFanta
    Junior Member
    Join Date: Nov 2007
    Old 07-29-2011 , 11:07   Re: [T2P] Advanced Free2Play Kicker/Replacer
    Reply With Quote #9

    Thanks for reporting this.
    Yes, there was a bug that sm_f2p_max could not be set correctly. This has been fixed now.

    Version 0.0.9 dose not support Sillium's features yet. I will look into them an merge them in the future. However, the main idea by using FIFO was to keep a good server rating (http://www.tf2.com/post.php?id=2338) and avoid the "Add server to blacklist"-pop-up. Some say this might not be important anymore, so I'll add those alternative kick types anyway.
    speziFanta is offline
    Datenkralle
    Member
    Join Date: Jan 2011
    Old 08-13-2011 , 20:38   Re: [T2P] Advanced Free2Play Kicker/Replacer
    Reply With Quote #10

    Thanks for the answer. And sorry for my late post. I will test it later in a new try and will look for a copy of these console text.

    I use the extended reserved slots plugin and the f2p renamer too, i hope there is no conflict.
    __________________
    Datenkralle is offline
    Reply


    Thread Tools
    Display Modes

    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 22:15.


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