Hey all
you may have noticed it was sometimes hard to kick laggers, or boring to check ping yourself etc.
That's why I think, a lagger auto-kick could be nice on some servers.
I tried to make one for my ladder, that's what I did :
1) you have to turn on a switch (-l) to enable the auto kick.
you have to specify the ping limit between "normal" player and "laggy" players with this switch; for example, if you want a limit of 700 of ping, you will have to add this to the cmd line :
-l700
(Note that the min value is 500)
2) The server check all players ping. When a ping is too high (compared to the limit) the player is in a lag period. If his ping doesn't go under the limit during the next x milliseconds, the player is auto kicked.
x is calculated from a formula (for my tests, I used :
x = (1.33/ping) * 5500 * 1000)
Lag period is reset only if the ping does under the limit during more than 1 second (this value can be changed).
This is what I actually did (I'm not cpp developper at all, sorry my code must be bad, but it should work, and you will see what I mean) :
serverevents.h
http://paste.debian.net/87957/
protos.h
http://paste.debian.net/87958/
My question : could something like this be implemented ?
Do you agree on the system ? Do you have better values or formulas to suggest ? Would you like something like that to exist ?
(Ask me if you didn't understand something)
Thanks, hope it will help
you may have noticed it was sometimes hard to kick laggers, or boring to check ping yourself etc.
That's why I think, a lagger auto-kick could be nice on some servers.
I tried to make one for my ladder, that's what I did :
1) you have to turn on a switch (-l) to enable the auto kick.
you have to specify the ping limit between "normal" player and "laggy" players with this switch; for example, if you want a limit of 700 of ping, you will have to add this to the cmd line :
-l700
(Note that the min value is 500)
2) The server check all players ping. When a ping is too high (compared to the limit) the player is in a lag period. If his ping doesn't go under the limit during the next x milliseconds, the player is auto kicked.
x is calculated from a formula (for my tests, I used :
x = (1.33/ping) * 5500 * 1000)
Lag period is reset only if the ping does under the limit during more than 1 second (this value can be changed).
This is what I actually did (I'm not cpp developper at all, sorry my code must be bad, but it should work, and you will see what I mean) :
serverevents.h
http://paste.debian.net/87957/
protos.h
http://paste.debian.net/87958/
My question : could something like this be implemented ?
Do you agree on the system ? Do you have better values or formulas to suggest ? Would you like something like that to exist ?
(Ask me if you didn't understand something)
Thanks, hope it will help