AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Kick Load Stuckers (https://forums.alliedmods.net/showthread.php?t=103203)

AtomicStryker 09-10-2009 08:33

[L4D & L4D2] Kick Load Stuckers
 
8 Attachment(s)
A rather small plugin i wrote for my heavily modded server.

For some reason i keep having 'Load Stuckers' ... people who connect, show up in status and Sourcemod Playerlist, but not ingame. They block a slot and can remain stuck there for quite some time (minutes!!).

So, here's a fix. On Player connect it starts a timer, after which the client is checked for being ingame. If hes not ... hes kicked out.

Theres also log file being made with stuck kicked people within sourcemod/logs/

Admins also get a command, sm_kickloading, which throws out all connected but not ingame players. Also, any client spouting any admin flag (reserved slot is enough) will never be automatically kicked. You can still kick them via command.



Cvars:

l4d_kickloadstuckers_version - the version
l4d_kickloadstuckers_duration - how long in seconds before a connected but not ingame player is kicked. (Default: 45 seconds)


Version History:
1.0.0 - Release
1.0.1 - fixed handle errors on empty server
1.0.2 - more handle error suppression on empty server
1.0.3 - update to the chat message, now includes custom kicktimes
1.0.4 - no more handle errors for real this time ;)
1.0.5 - added Log file function
1.0.6 - added check for admin status to not kick those
1.0.7 - dont remember
1.0.8 - bugfix invalid timers

kiwi87 09-10-2009 15:19

Re: [L4D] Kick Load Stuckers
 
Useful! This will save me the trouble of checking thru the list and see who isn't in game but stuck!

cool will test it out~

Evian 09-10-2009 21:01

Re: [L4D] Kick Load Stuckers
 
Useless ....









FAKE :D Awesome

Siezmik 09-11-2009 00:45

Re: [L4D] Kick Load Stuckers
 
Perfect timing - I just had this problem on our server last night.

However, I'm getting the following errors in the console . . .


L 09/11/2009 - 04:29:22: [SM] Native "KillTimer" reported: Invalid timer handle b3b100f7 (error 1)
L 09/11/2009 - 04:29:22: [SM] Displaying call stack trace for plugin "custom/l4d_kickloadstuckers.smx":

L 09/11/2009 - 04:30:14: [SM] Native "KillTimer" reported: Invalid data handle c39100f8 (error 1) on timer kill with TIMER_DATA_HNDL_CLOSE
L 09/11/2009 - 04:30:14: [SM] Displaying call stack trace for plugin "custom/l4d_kickloadstuckers.smx":
L 09/11/2009 - 04:30:14: [SM] [0] Line 51, /home/groups/alliedmodders/forums/files/5/2/2/3/3/49427.attach::OnClientDisconnect()

L 09/11/2009 - 04:30:14: [SM] Native "KillTimer" reported: Invalid timer handle b3ad00fd (error 3)
L 09/11/2009 - 04:30:14: [SM] Displaying call stack trace for plugin "custom/l4d_kickloadstuckers.smx":
L 09/11/2009 - 04:30:14: [SM] [0] Line 51, /home/groups/alliedmodders/forums/files/5/2/2/3/3/49427.attach::OnClientDisconnect()

olj 09-11-2009 03:49

Re: [L4D] Kick Load Stuckers
 
PHP Code:

CreateConVar("l4d_kickloadstuckers_version"PLUGIN_VERSION" Version of L4D Incapped Pills Pop on this server " 

SourceMod Timer Function giving me cripples, really...

AtomicStryker 09-11-2009 08:13

Re: [L4D] Kick Load Stuckers
 
Quote:

Originally Posted by Siezmik (Post 929433)
Perfect timing - I just had this problem on our server last night.

However, I'm getting the following errors in the console . . .


L 09/11/2009 - 04:29:22: [SM] Native "KillTimer" reported: Invalid timer handle b3b100f7 (error 1)
L 09/11/2009 - 04:29:22: [SM] Displaying call stack trace for plugin "custom/l4d_kickloadstuckers.smx":

L 09/11/2009 - 04:30:14: [SM] Native "KillTimer" reported: Invalid data handle c39100f8 (error 1) on timer kill with TIMER_DATA_HNDL_CLOSE
L 09/11/2009 - 04:30:14: [SM] Displaying call stack trace for plugin "custom/l4d_kickloadstuckers.smx":
L 09/11/2009 - 04:30:14: [SM] [0] Line 51, /home/groups/alliedmodders/forums/files/5/2/2/3/3/49427.attach::OnClientDisconnect()

L 09/11/2009 - 04:30:14: [SM] Native "KillTimer" reported: Invalid timer handle b3ad00fd (error 3)
L 09/11/2009 - 04:30:14: [SM] Displaying call stack trace for plugin "custom/l4d_kickloadstuckers.smx":
L 09/11/2009 - 04:30:14: [SM] [0] Line 51, /home/groups/alliedmodders/forums/files/5/2/2/3/3/49427.attach::OnClientDisconnect()


This happens on a now empty server - it resets everything before the plugin is even done wiping itself. Ill try and write something around this ... though it has no effect besides the error message.


EDIT:

Aaaaand done.

Siezmik 09-11-2009 17:20

Re: [L4D] Kick Load Stuckers
 
Thanks for the fix!

Ja-Forces 09-12-2009 02:13

Re: [L4D] Kick Load Stuckers
 
L 09/12/2009 - 10:10:31: [SM] Native "CloseHandle" reported: Handle 270b0161 is invalid (error 1)
L 09/12/2009 - 10:10:31: [SM] Displaying call stack trace for plugin "l4d_kickloadstuckers.smx":
L 09/12/2009 - 10:10:31: [SM] [0] Line 52, /home/groups/alliedmodders/forums/files/5/2/2/3/3/49427.attach::OnClientDisconnect()
L 09/12/2009 - 10:11:26: [SM] Native "CloseHandle" reported: Handle 35c80192 is invalid (error 3)
L 09/12/2009 - 10:11:26: [SM] Displaying call stack trace for plugin "l4d_kickloadstuckers.smx":
L 09/12/2009 - 10:11:26: [SM] [0] Line 52, /home/groups/alliedmodders/forums/files/5/2/2/3/3/49427.attach::OnClientDisconnect()

AtomicStryker 09-12-2009 08:46

Re: [L4D] Kick Load Stuckers
 
Isnt CloseHandle supposed to just return 'false' if it fails? Meh, ill try another thing right away.

EDIT:
Ive altered the Timer Killer to work with a Timer, which at least for me didnt trigger any Handle errors. Do report back about it

JenovaDarkness 09-12-2009 09:52

Re: [L4D] Kick Load Stuckers
 
So this didn't work?

Code:


public Action:KillAllTimers()
{
 for (new i = 1; i <= MaxClients; i++)
 {
  if (LoadingTimer[i] != INVALID_HANDLE) CloseHandle(LoadingTimer[i])
 }
}

Instead of using on map end, why don't you hook round start and round end and create and kill the timers after those events are triggered? They are fired multiple times but I haven't had a problem as long as I wasn't closing an already closed handle.


All times are GMT -4. The time now is 19:10.

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