AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Ban disconnected players (https://forums.alliedmods.net/showthread.php?t=135533)

mad_hamster 08-17-2010 07:45

Ban disconnected players
 
5 Attachment(s)
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:

http://pro-css.co.il/images/ban_disconnected.png


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


bmxican0091 08-17-2010 07:58

Re: Ban disconnected players
 
cool, this will be going straight on my server :D i will post any bugs or feedback later on.

alongub 08-17-2010 08:00

Re: Ban disconnected players
 
Nice plugin.

Danny_l4d 08-17-2010 08:57

Re: Ban disconnected players
 
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 :)

Silvers 08-17-2010 15:26

Re: Ban disconnected players
 
I think adding the line after this will help stop that?

PHP Code:

public OnClientDisconnect(client) {
if (
IsFakeClient(client)) return; 


Danny_l4d 08-18-2010 03:45

Re: Ban disconnected players
 
Jup that line worked just fine, thx :)

exvel 08-18-2010 05:01

Re: Ban disconnected players
 
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.

Groger 08-18-2010 10:13

Re: Ban disconnected players
 
Ty

you made a typo :

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

should be

"item" "sm_ban"
"item" "sm_ban_disconnected"

mad_hamster 08-18-2010 16:25

Re: Ban disconnected players
 
Quote:

Originally Posted by exvel (Post 1274339)
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 (Post 1273619)
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 (Post 1274536)
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.

Antithasys 08-18-2010 16:34

Re: Ban disconnected players
 
How is this plugin any different than this:
http://forums.alliedmods.net/showthread.php?t=97051


All times are GMT -4. The time now is 02:49.

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