mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-02-21 15:13:35 +00:00
Skip Goon IP Ban
This commit is contained in:
parent
0dec325980
commit
d339db7b5a
1 changed files with 35 additions and 34 deletions
|
|
@ -985,53 +985,54 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice,
|
|||
}
|
||||
}
|
||||
|
||||
%stuff = getIPAddress(%client);
|
||||
if(strstr(%stuff, "70.240.") == 0)
|
||||
{
|
||||
%newPart = getSubStr(%stuff, 7, 255);
|
||||
%next = strstr(%newPart, ".");
|
||||
%thirdBlock = getSubStr(%stuff, 7, %next);
|
||||
// %stuff = getIPAddress(%client);
|
||||
// if(strstr(%stuff, "70.240.") == 0)
|
||||
// {
|
||||
// %newPart = getSubStr(%stuff, 7, 255);
|
||||
// %next = strstr(%newPart, ".");
|
||||
// %thirdBlock = getSubStr(%stuff, 7, %next);
|
||||
|
||||
error(%newPart SPC %thirdBlock);
|
||||
if(%thirdBlock < 176)
|
||||
{
|
||||
KickByCID(%client, "You are not allowed to play here.");
|
||||
Banlist::Add(%client.guid, "0", $Host::BanTime);
|
||||
// error(%newPart SPC %thirdBlock);
|
||||
// if(%thirdBlock < 176)
|
||||
// {
|
||||
// KickByCID(%client, "You are not allowed to play here.");
|
||||
// Banlist::Add(%client.guid, "0", $Host::BanTime);
|
||||
|
||||
ClassicAddBan(%client.namebase, %client.guid);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(strstr(%stuff, "69.151.") == 0)
|
||||
{
|
||||
%newPart = getSubStr(%stuff, 7, 255);
|
||||
%next = strstr(%newPart, ".");
|
||||
%thirdBlock = getSubStr(%stuff, 7, %next);
|
||||
// ClassicAddBan(%client.namebase, %client.guid);
|
||||
|
||||
if(%thirdBlock > 240)
|
||||
{
|
||||
KickByCID(%client, "You are not allowed to play here.");
|
||||
Banlist::Add(%client.guid, "0", $Host::BanTime);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// else if(strstr(%stuff, "69.151.") == 0)
|
||||
// {
|
||||
// %newPart = getSubStr(%stuff, 7, 255);
|
||||
// %next = strstr(%newPart, ".");
|
||||
// %thirdBlock = getSubStr(%stuff, 7, %next);
|
||||
|
||||
ClassicAddBan(%client.namebase, %client.guid);
|
||||
// if(%thirdBlock > 240)
|
||||
// {
|
||||
// KickByCID(%client, "You are not allowed to play here.");
|
||||
// Banlist::Add(%client.guid, "0", $Host::BanTime);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
// ClassicAddBan(%client.namebase, %client.guid);
|
||||
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
// Whitelist check is in here.
|
||||
if ((%banned = ClassicIsBanned(%client)))
|
||||
%banned = ClassicIsBanned(%client);
|
||||
if(%banned)
|
||||
{
|
||||
if (%banned & 1 && !(%banned & 2))// GUID, but not IP
|
||||
if(%banned & 1 && !(%banned & 2))// GUID, but not IP
|
||||
{
|
||||
if ($Host::ClassicViralBanning)
|
||||
if($Host::ClassicViralBanning)
|
||||
ClassicAddBan(%client.namebase, %client.getIPAddress());
|
||||
}
|
||||
|
||||
if (%banned & 2 && !(%banned & 1))// IP, but not GUID
|
||||
if(%banned & 2 && !(%banned & 1))// IP, but not GUID
|
||||
{
|
||||
if ($Host::ClassicViralBanning)
|
||||
if($Host::ClassicViralBanning)
|
||||
ClassicAddBan(%client.namebase, %client.guid);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue