sapphonie / MGEMod

Maintained version of MGEMod by Lange, and ChillyMGE, by pepperkick
GNU General Public License v3.0
31 stars 15 forks source link

Fix kicking not attributing Elo losses #5

Closed ldesgoui closed 3 years ago

ldesgoui commented 3 years ago

In OnClientDisconnect, IsValidClient is called, it returns false when a player is in the kick queue, which allows them to abuse automated kick systems to bypass losses counting towards their Elo

sapphonie commented 3 years ago

why even bother checking IsClientInKickQueue in this validclient check, pretty sure it could be greatly simplified to something like

bool IsValidClient(int client)
{
    return ((0 < client <= MaxClients) && IsClientInGame(client) && !IsFakeClient(client));
}
ldesgoui commented 3 years ago

Not sure, didn't feel like figuring out if it was important

sapphonie commented 3 years ago

actually

bool IsValidClient(int client)
{
    return ((0 < client <= MaxClients) && IsClientInGame(client) && !IsClientSourceTV(client) && !IsClientReplay(client));
}
sapphonie commented 3 years ago

ill merge this 4 now, regardless

thanks for the contribution <3