Raised This Month: $12 Target: $400
 3% 

Ban disconnected players


Post New Thread Reply   
 
Thread Tools Display Modes
Author
mad_hamster
Member
Join Date: Nov 2009
Plugin ID:
1892
Plugin Version:
1.04
Plugin Category:
Admin Commands
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    102 
    Plugin Description:
    Tracks recently-disconnected players and lets you ban them
    Old 08-17-2010 , 07:45   Ban disconnected players
    Reply With Quote #1

    Ban disconnected players


    This plugin tracks recently disconnected players (currently 100) and lets you ban them, either through the admin menu or through the admin command "sm_bandisconnected", which requires the admin ban flag.

    I made this plugin primarily to fix a couple of issues I was having with the Too Late To Ban plugin, namely:
    • Admin needed RCON flag to ban disconnected players
    • Admin immunities were not respected
    This is how the admin menu looks like:




    Installation:

    Just put the plugin in your plugins directory, no configuration needed. If you want the "Ban disconnected player" option to show up right next to the "Ban player" option in the admin menu just edit your adminmenu_sorting.txt file under "configs" and add sm_ban_disconnected underneath sm_ban, like so:

    Code:
            "item"        "sm_ban"
            "item"        "sm_bandisconnected"
    Change history:
    • 1.03 - (Hopefully) fixed some issues with GMOD and TF2

    Attached Files
    File Type: sp Get Plugin or Get Source (ban_disconnected.sp - 13510 views - 10.4 KB)

    Last edited by mad_hamster; 02-05-2011 at 03:26. Reason: bugfix
    mad_hamster is offline
    bmxican0091
    Member
    Join Date: Jan 2010
    Location: Australia, Victoria.
    Old 08-17-2010 , 07:58   Re: Ban disconnected players
    Reply With Quote #2

    cool, this will be going straight on my server i will post any bugs or feedback later on.
    __________________

    bmxican0091 is offline
    alongub
    Veteran Member
    Join Date: Aug 2009
    Location: Israel
    Old 08-17-2010 , 08:00   Re: Ban disconnected players
    Reply With Quote #3

    Nice plugin.
    alongub is offline
    Danny_l4d
    Senior Member
    Join Date: Feb 2010
    Old 08-17-2010 , 08:57   Re: Ban disconnected players
    Reply With Quote #4

    I tried this plugin but mabye it works too wel, I use l4d, and it aslo shows smoker, boomer, hunter then I use bebop to add auto extra bots and kick them, and even this the plugin sees, so looking for a player name is hard becasue if 1 player leaves you have his name the bebop_fake_client and or zoey francis,
    this way I have 100 people disconnected and from these 100 there mabye 10 real
    __________________
    Danny_l4d is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-17-2010 , 15:26   Re: Ban disconnected players
    Reply With Quote #5

    I think adding the line after this will help stop that?

    PHP Code:
    public OnClientDisconnect(client) {
    if (
    IsFakeClient(client)) return; 
    Silvers is offline
    Danny_l4d
    Senior Member
    Join Date: Feb 2010
    Old 08-18-2010 , 03:45   Re: Ban disconnected players
    Reply With Quote #6

    Jup that line worked just fine, thx
    __________________
    Danny_l4d is offline
    exvel
    SourceMod Donor
    Join Date: Jun 2006
    Location: Russia
    Old 08-18-2010 , 05:01   Re: Ban disconnected players
    Reply With Quote #7

    Good plugin. But I recommend you to use player_disconnect event instead of OnClientDisconnect forward. The reason why player_disconnect is better because OnClientDisconnect calls for every client during the map change even if client didn't disconnect but player_disconnect event fires only when client is actually disconnected.
    __________________
    For admins: My plugins

    For developers: Colors library
    exvel is offline
    Send a message via ICQ to exvel
    Groger
    Veteran Member
    Join Date: Oct 2009
    Location: Belgium
    Old 08-18-2010 , 10:13   Re: Ban disconnected players
    Reply With Quote #8

    Ty

    you made a typo :

    "item" "sm_ban"
    "item" "sm_bandisconnected"

    should be

    "item" "sm_ban"
    "item" "sm_ban_disconnected"
    Groger is offline
    mad_hamster
    Member
    Join Date: Nov 2009
    Old 08-18-2010 , 16:25   Re: Ban disconnected players
    Reply With Quote #9

    Quote:
    Originally Posted by exvel View Post
    Good plugin. But I recommend you to use player_disconnect event instead of OnClientDisconnect forward. The reason why player_disconnect is better because OnClientDisconnect calls for every client during the map change even if client didn't disconnect but player_disconnect event fires only when client is actually disconnected.
    Thanks, I did that.

    Quote:
    Originally Posted by Silvers View Post
    I think adding the line after this will help stop that?

    PHP Code:
    public OnClientDisconnect(client) {
    if (
    IsFakeClient(client)) return; 
    Yes, but this doesn't work when listening to the disconnection event since the client is gone by then, so I check its steam id, if it doesn't start with "STEAM_" then it's not a human.

    Quote:
    Originally Posted by Groger View Post
    Ty

    you made a typo :

    "item" "sm_ban"
    "item" "sm_bandisconnected"

    should be

    "item" "sm_ban"
    "item" "sm_ban_disconnected"
    Hmm... nope, it's correct. The plugin name is ban_disconnected, but the admin command that it provides is "sm_bandisconnected". Sorry for the confusing names.
    mad_hamster is offline
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 08-18-2010 , 16:34   Re: Ban disconnected players
    Reply With Quote #10

    How is this plugin any different than this:
    http://forums.alliedmods.net/showthread.php?t=97051
    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?
    Antithasys 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 07:44.


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