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

[L4D & L4D2] Kick Load Stuckers


Post New Thread Reply   
 
Thread Tools Display Modes
Mr. Zero
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 03-11-2012 , 18:48   Re: [L4D & L4D2] Kick Load Stuckers
Reply With Quote #51

Quote:
Originally Posted by Sidder View Post
Maybe one suggestion: is there any way to make it ignore any of the flags? So even admins who crashed and are stuck just get removed?

Unless there is already a way around this

thx anyhow
Remove the following lines from the script (Line 70 - 74):
PHP Code:
        if (FindAdminByIdentity(AUTHMETHOD_STEAMsteamid) != INVALID_ADMIN_ID)
        {
            
LogToFileEx(file"%s - %N - NOT KICKED DUE TO ADMIN STATUS"steamidclient);
            return;
        } 
Then paste the script it into the web compiler.
http://www.sourcemod.net/compiler.php
Mr. Zero is offline
jking
AlliedModders Donor
Join Date: Jan 2012
Old 04-24-2012 , 20:56   Re: [L4D & L4D2] Kick Load Stuckers
Reply With Quote #52

Is there a config file for this, I don't see one, thanks. I also don't see this listed in HLSW either.

Last edited by jking; 04-24-2012 at 21:11.
jking is offline
Sidder
Member
Join Date: Jan 2012
Old 06-03-2012 , 04:52   Re: [L4D & L4D2] Kick Load Stuckers
Reply With Quote #53

L 06/03/2012 - 10:13:45: SourceMod error session started
L 06/03/2012 - 10:13:45: Info (map "c1m4_atrium") (file "errors_20120603.log")
L 06/03/2012 - 10:13:45: [SM] Native "KillTimer" reported: Invalid timer handle 9f3d03e5 (error 1)
L 06/03/2012 - 10:13:45: [SM] Displaying call stack trace for plugin "l4d_kickloadstuckers.smx":
L 06/03/2012 - 10:13:45: [SM] [0] Line 52, /home/groups/sourcemod/upload_tmp/phpfCM2Nf.sp::OnClientDisconnect()
L 06/03/2012 - 10:16:51: [SM] Native "KillTimer" reported: Invalid timer handle 9f2d03e2 (error 3)
L 06/03/2012 - 10:16:51: [SM] Displaying call stack trace for plugin "l4d_kickloadstuckers.smx":
L 06/03/2012 - 10:16:51: [SM] [0] Line 52, /home/groups/sourcemod/upload_tmp/phpfCM2Nf.sp::OnClientDisconnect()
L 06/03/2012 - 10:17:50: [SM] Native "KillTimer" reported: Invalid timer handle 9f3703c0 (error 3)
L 06/03/2012 - 10:17:50: [SM] Displaying call stack trace for plugin "l4d_kickloadstuckers.smx":
L 06/03/2012 - 10:17:50: [SM] [0] Line 52, /home/groups/sourcemod/upload_tmp/phpfCM2Nf.sp::OnClientDisconnect()


L 06/03/2012 - 10:17:50: [SM] Native "KillTimer" reported: Invalid timer handle 9f4303cf (error 3)
L 06/03/2012 - 10:17:50: [SM] Displaying call stack trace for plugin "l4d_kickloadstuckers.smx":
L 06/03/2012 - 10:17:50: [SM] [0] Line 52, /home/groups/sourcemod/upload_tmp/phpfCM2Nf.sp::OnClientDisconnect() L 06/03/2012 - 101:50: Error log file session closed.
Sidder is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 06-03-2012 , 12:46   Re: [L4D & L4D2] Kick Load Stuckers
Reply With Quote #54

eh? that was fixed in verison 1.0.8. check sm plugins list to see if you're running one of the older versions?

Last edited by Visual77; 06-03-2012 at 12:50.
Visual77 is offline
Sidder
Member
Join Date: Jan 2012
Old 06-04-2012 , 04:55   Re: [L4D & L4D2] Kick Load Stuckers
Reply With Quote #55

Code:
01 "L4D Kick Load Stuckers" (1.0.8) by AtomicStryker
Its an upto date one, only thing thats diff Is I removee the kick immunity for admins, with the fix from zero

Guess it might be that tweak?

Last edited by Sidder; 06-04-2012 at 04:56.
Sidder is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 06-05-2012 , 08:21   Re: [L4D & L4D2] Kick Load Stuckers
Reply With Quote #56

no shouldn't be. try removing ( !AreHumansConnected() ) return;
it might prevent the killtimer process. have no idea why he added that in the first place either. I've been running without that since forever without problems.

and the stock bool:AreHumansConnected() ofc.

Last edited by Visual77; 06-05-2012 at 08:36.
Visual77 is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 06-05-2012 , 09:10   Re: [L4D & L4D2] Kick Load Stuckers
Reply With Quote #57

I never had any problems with my first version. The problem begins when a disconnecting person results in an invalid timer handle, which the plugin cannot get out of. Its a Sourcemod issue IMO.
AtomicStryker is offline
Evkval
Junior Member
Join Date: Jul 2010
Location: Russia
Old 09-24-2016 , 08:48   Re: [L4D & L4D2] Kick Load Stuckers
Reply With Quote #58

sourcemod 1.7.3


//// l4d_kickloadstuckers.sp
//
// l4d_kickloadstuckers.sp(69) : warning 234: symbol "GetClientAuthString" is marked as deprecated: Use GetClientAuthId
//
//
// Code size: 4668 bytes
// Data size: 3228 bytes
// Stack/heap size: 16384 bytes
// Total requirements: 24280 bytes
//
// 1 Warning.
//
// Compilation Time: 0,16 sec
// ----------------------------------------
Evkval is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 09-24-2016 , 11:22   Re: [L4D & L4D2] Kick Load Stuckers
Reply With Quote #59

Quote:
Originally Posted by Evkval View Post
sourcemod 1.7.3


//// l4d_kickloadstuckers.sp
//
// l4d_kickloadstuckers.sp(69) : warning 234: symbol "GetClientAuthString" is marked as deprecated: Use GetClientAuthId
//
//
// Code size: 4668 bytes
// Data size: 3228 bytes
// Stack/heap size: 16384 bytes
// Total requirements: 24280 bytes
//
// 1 Warning.
//
// Compilation Time: 0,16 sec
// ----------------------------------------
Download the .sp and change GetClientAuthString to GetClientAuthId, easy fix...or compile it using an older compiler

Last edited by MasterMind420; 09-24-2016 at 11:23.
MasterMind420 is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 09-24-2016 , 11:27   Re: [L4D & L4D2] Kick Load Stuckers
Reply With Quote #60

PHP Code:
#pragma semicolon 1

#include <sourcemod>
#define PLUGIN_VERSION "1.0.8"

public Plugin:myinfo 
{
    
name "L4D Kick Load Stuckers",
    
author "AtomicStryker",
    
description "Kicks Clients that get stuck in server connecting state",
    
version PLUGIN_VERSION,
    
url "http://forums.alliedmods.net/showthread.php?t=103203"
}

static 
Handle:LoadingTimer[MAXPLAYERS+1]     = INVALID_HANDLE;
static 
Handle:cvarDuration                     INVALID_HANDLE;

public 
OnPluginStart()
{
    
RegAdminCmd("sm_kickloading"KickLoadersADMFLAG_KICK"Kicks everyone Connected but not ingame");
    
CreateConVar(                "l4d_kickloadstuckers_version",     PLUGIN_VERSION" Version of L4D Kick Load Stuckers on this server ",                             FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_NOTIFY|FCVAR_DONTRECORD);
    
cvarDuration CreateConVar("l4d_kickloadstuckers_duration",     "60",             " How long before a connected but not ingame player is kicked. (default 60) ",     FCVAR_PLUGIN|FCVAR_NOTIFY);
}

public 
Action:KickLoaders(clientsargs)
{
    for (new 
1<= MaxClientsi++)
    {
        if (!
IsClientConnected(i)) continue;
        if (!
IsClientInGame(i))
        {
            
PrintToChatAll("%N was admin kicked for being stuck in connecting state"i);
            
            
//BanClient(i, 0, BANFLAG_AUTO, "Slowass Loading", "Slowass Loader");
            
KickClient(i"You were stuck Connecting for too long");
        }
    }
    return 
Plugin_Handled;
}

public 
OnClientConnected(client)
{
    
LoadingTimer[client] = CreateTimer(GetConVarFloat(cvarDuration), CheckClientIngameclientTIMER_FLAG_NO_MAPCHANGE); //on successfull connect the Timer is set in motion
}

public 
OnClientDisconnect(client)
{
    if ( !
AreHumansConnected() ) return;
    
    if (
LoadingTimer[client] != INVALID_HANDLE
    {
        
KillTimer(LoadingTimer[client]);
        
LoadingTimer[client] = INVALID_HANDLE;
    }
}

public 
Action:CheckClientIngame(Handle:timerany:client)
{
    
LoadingTimer[client] = INVALID_HANDLE;

    if (!
IsClientConnected(client)) return; //onclientdisconnect should handle this, but you never know
    
    
if (!IsClientInGame(client))
    {
        
//player log file code. name and steamid only
        
decl String:file[PLATFORM_MAX_PATH], String:steamid[128];
        
BuildPath(Path_SMfilesizeof(file), "logs/stuckplayerlog.log");
    
        
GetClientAuthId(clientAuthId_Steam2steamidsizeof(steamid));
        if (
FindAdminByIdentity(AUTHMETHOD_STEAMsteamid) != INVALID_ADMIN_ID)
        {
            
LogToFileEx(file"%s - %N - NOT KICKED DUE TO ADMIN STATUS"steamidclient);
            return;
        }
    
        
PrintToChatAll("%N was kicked for being stuck in connecting state for %i seconds"clientRoundToNearest(GetConVarFloat(cvarDuration)));
        
        
KickClient(client"You were stuck Connecting for too long");
        
        
LogToFileEx(file"%s - %N"steamidclient); // this logs their steamids and names. to be banned.
    
}
}

stock bool:AreHumansConnected()
{
    for (new 
1<= MaxClientsi++)
    {
        if (
IsClientConnected(i) && !IsFakeClient(i)) return true;
    }
    return 
false;

Attached Files
File Type: sp Get Plugin or Get Source (l4d_kickloadstuckers.sp - 661 views - 2.9 KB)
__________________
Spirit_12 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 00:41.


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