Forums Index >> Modding >> Impersonator Blocker



Page : <1> :


Found this in an old Garage Games thread.

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=8897

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.

 

Monday, June 26, 2006 at 8:08:56 AM

Damnit... :(

Monday, June 26, 2006 at 8:13:53 AM

Already done in dash's admin script.

There is a file called "nameregister.cs," which already does this, however you must manually enter IPs into the file.

Monday, June 26, 2006 at 8:55:37 AM

So thats what nameregister does! :) what about userlog.cs? Whats that do? :o

 

Tuesday, June 27, 2006 at 8:16:46 AM

^It logs the users that come in and leave.

 

 

 

 

Tuesday, June 27, 2006 at 5:20:02 PM

Page : <1> :

insert quote insert url insert email insert image bold italic underline superscript subscript horizontal rule : : Help on using forum codes

Add comment:

HTML is disabled within comments, but ZBB Code is enabled.

Back to the top

Web site designed, maintained and funded by -z- and Dan MacDonald