high ping kicker

Discussion for Admins of ETPro/BayonET servers.
If you don't run a server, please don't post here...

Moderators: Forum moderators, developers

Post Reply
c0m4r
Posts: 22
Joined: Wed Oct 12, 2005 4:17 am
Contact:

high ping kicker

Post by c0m4r »

As you know maxping command applies only to ping with which the player connects to the server. Whether anyone is able to write a lua script, which will be kicking players with ping bigger than e.g. 150ms after 20 seconds. Maybe someone already did such a script or I can set it up other way.

Regards,
c0m4r
User avatar
gotenks
Posts: 3465
Joined: Fri Nov 15, 2002 4:12 pm
Location: out of my mind
Contact:

Post by gotenks »

you don't have access to their ping via lua. but why would you want to do this? someone get's a spike and they get kicked even though their ping is normally fine?
My Website
Image
After a night of binge drinking:
=FF=im2good4u wrote:WTF wanst i on top ?
User avatar
Father
Posts: 107
Joined: Sat Jul 22, 2006 1:30 pm
Location: Czech Republic
Contact:

Post by Father »

There is antiwarp.. so you don't need such script for punishing high-pingers.
If you don't do it, someone else will.
User avatar
gotenks
Posts: 3465
Joined: Fri Nov 15, 2002 4:12 pm
Location: out of my mind
Contact:

Post by gotenks »

antiwarp doesn't affect high ping, that's only when packets get bunched up instead of evenly distributed. antilag affects high ping
My Website
Image
After a night of binge drinking:
=FF=im2good4u wrote:WTF wanst i on top ?
c0m4r
Posts: 22
Joined: Wed Oct 12, 2005 4:17 am
Contact:

Post by c0m4r »

you don't have access to their ping via lua. but why would you want to do this? someone get's a spike and they get kicked even though their ping is normally fine?
frankly, yes I do, because these laggers affect the stability of other players if their lag takes a while, antilag only reduces ping with help of other players, essentially does not change the fact that someone has lag

rare who has more than 200ms for more than a few seconds so it shouldn't touch the players, in another case, of course, it would be exaggerated
Last edited by c0m4r on Sat Jun 06, 2009 2:50 am, edited 1 time in total.
User avatar
X-DOS
Posts: 19
Joined: Sat May 17, 2008 8:41 pm
Location: United World
Contact:

Post by X-DOS »

Code: Select all

sv_maxclients = tonumber( et.trap_Cvar_Get( "sv_maxclients" ) )
sv_maxping = tonumber( et.trap_Cvar_Get( "sv_maxping" ) )

-- function checking current ping for all active players
for i = 0, i < sv_maxclients do
    if et.gentity_get&#40; i, "inuse" &#41; and et.gentity_get&#40; i, "ps.ping" &#41; > sv_maxping then
        et.trap_DropClient&#40; i, "high ping", 5 &#41;
    end
end
Quick work, i havn't test it.
Much more powerful function should gather average ping and if this average is higher than sv_maxping then kicks a player, but i'm to lazy to write it here :P
Last edited by X-DOS on Sat Jun 06, 2009 10:55 am, edited 1 time in total.
User avatar
gotenks
Posts: 3465
Joined: Fri Nov 15, 2002 4:12 pm
Location: out of my mind
Contact:

Post by gotenks »

as i said, lua cannot access ping, i tried this for a spec999 option, it doesn't work.
also you have a very superstitious view of ping, person A's ping cannot affect person B. and antilag rewinds the game ONLY on hitscan weapons, it rewinds the game to see where his bullet would have landed had he had a ping of 0. If the person is dead before the calculation is complete and damage has been dispensed, the game ignores it... so he still has a disadvantage. How exactly do you figure that it "reduces ping with help of other players"?
My Website
Image
After a night of binge drinking:
=FF=im2good4u wrote:WTF wanst i on top ?
User avatar
X-DOS
Posts: 19
Joined: Sat May 17, 2008 8:41 pm
Location: United World
Contact:

Post by X-DOS »

gotenks wrote:as i said, lua cannot access ping, i tried this for a spec999 option, it
It's quiet interesting, because i have implemented !spec999 command for my mod and it works well
c0m4r
Posts: 22
Joined: Wed Oct 12, 2005 4:17 am
Contact:

Post by c0m4r »

In this case - I was wrong, and thank you for an explanation. The problem is that sometimes on my server we have a lag for all players and a high ping around 200-300ms for several players. First, I thought that this is overload of the machine, but as it figured out on the same machine (2xIntel Xeon 2,66, 16GB RAM, 100MBit connection) can be SRCDS (CS: Source), HLDS (CS 1.6), and a few Call of Duty and they have no lags. Server has 16 slots, running etadmin_mod (I tried without it), cb 6on6 config with their cvar restrictions (mxpk 100, rate 2500, tnudge 0 etc.). Also I tried with g_antilag 0 and 1, there is no difference. Anyhow this script will not help much, only for 999 players as X-DOS mentioned.
Post Reply