Code: Select all
new iClientConnectionsCount = 0;
for(new i=0;i<MAX_CONNECTIONS;i++)
{
if (StrEqual(g_sClientConnections[i], f_sClientIP))
iClientConnectionsCount++;
if (iClientConnectionsCount > 3)
{
Format(rejectmsg, size, "Please wait one minute before retrying to connect");
BanIdentity(f_sClientIP, 1, BANFLAG_IP, "Spam Connecting"); // We do not want this hooked, so no source.
return false;
}
}
This is a serious exploit to crash server and with this mod and kac_client_antispamconnect high enought, I think, it'll still get it's job done.