Impersonator Blocker
by Brian Jansen · 10/23/2005 (4:40 pm) · 4 comments
I have a simple impersonater blocker for people with static ip's
1) Put this in main.cs in the main folder that contains the data, server, and client folders
As you may probably guess this is from common/server/clientconnection.cs but to make the imposter blocker work you need to add this above echo("Connect request from: " @ %netAddress);
But again this is for people with static IP's.
What this resource does is when someone joins a server it checks the name they are using and if the name matches one in the blocker's scripts it try's to match it with the IP it has been set with. If the IP and name are not the right pair it Kicks and bans the Imposter.
1) Put this in main.cs in the main folder that contains the data, server, and client folders
function GameConnection::onConnectRequest( %client, %netAddress, %name )
{
echo("Connect request from: " @ %netAddress);
%client.name = %name;
//check ban list
%ip = getRawIP(%client);
%i = 0;
for(%i = 0; %i <= $Ban::numBans; %i++)
{
echo("checking banlist ", %i);
if(%ip $= $Ban::ip[%i])
{
return "You are banned.";
}
}
if($Server::PlayerCount >= $pref::Server::MaxPlayers)
return "CR_SERVERFULL";
return "";
}As you may probably guess this is from common/server/clientconnection.cs but to make the imposter blocker work you need to add this above echo("Connect request from: " @ %netAddress);
if(%name $= "Insert_name_here")
{
%ip = getRawIP(%client);
if(%ip !$= "put_your_ip_here")
{
%client.delete("Imposters Suck.");
$Ban::numBans++;
$Ban::ip[$Ban::numBans] = %ip;
}But again this is for people with static IP's.
What this resource does is when someone joins a server it checks the name they are using and if the name matches one in the blocker's scripts it try's to match it with the IP it has been set with. If the IP and name are not the right pair it Kicks and bans the Imposter.
#2
10/24/2005 (4:21 am)
this is for game makers to put this in so unless they are using this for their users it should be pretty secure
#3
10/24/2005 (12:07 pm)
so this is for the Game Makers to protect their own user name?
#4
10/29/2005 (12:08 pm)
yes because people who act like another person usually do it to give that person a bad reputation 
Torque Owner Josh "GimpMaster" Hintze