Topic: [REQUEST] Automatic high ping players kick [c++ help needed]
I don't know if it's possible to enable the server to kick high ping players through players.cpp ,
but it seems very easy..
{
CLIENT_INFO info;
if(server_getclientinfo(client_id, &info))
{
latency.accum += info.latency;
latency.accum_max = max(latency.accum_max, info.latency);
latency.accum_min = min(latency.accum_min, info.latency);
}
if(server_tick()%server_tickspeed() == 0)
{
latency.avg = latency.accum/server_tickspeed();
latency.max = latency.accum_max;
latency.min = latency.accum_min;
latency.accum = 0;
latency.accum_min = 1000;
latency.accum_max = 0;
}
}
Is it possible to add a line somewhere there which disconnects players with a certain ping?
Maybe this ping limit could be a setting in the configs? any1 got an idea how i can do this?