Page 1 of 1

high ping kicker

Posted: Fri Jun 05, 2009 7:44 am
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

Posted: Fri Jun 05, 2009 10:29 am
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?

Posted: Fri Jun 05, 2009 12:46 pm
by Father
There is antiwarp.. so you don't need such script for punishing high-pingers.

Posted: Fri Jun 05, 2009 5:41 pm
by gotenks
antiwarp doesn't affect high ping, that's only when packets get bunched up instead of evenly distributed. antilag affects high ping

Posted: Sat Jun 06, 2009 1:50 am
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

Posted: Sat Jun 06, 2009 2:02 am
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

Posted: Sat Jun 06, 2009 10:42 am
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"?

Posted: Sat Jun 06, 2009 10:45 am
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

Posted: Sat Jun 06, 2009 1:24 pm
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.