max account limitation per IP

Open discussion forum. For topics that do not fit anywhere else.

Moderator: POL Developer

Post Reply
yayafan
Novice Poster
Posts: 40
Joined: Sun Mar 15, 2015 2:26 am

max account limitation per IP

Post by yayafan »

Hello,
Does anyone know how to limit the maximum accounts per IP ?
In my shard some one register a lot of new accounts to get new player starting gold , I'm running POL99 server. I'm wondering whether there is a setting in some .cfg file.
Thanks!
User avatar
CWO
POL Expert
Posts: 1158
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Re: max account limitation per IP

Post by CWO »

There's no limitation in a configuration file but you can script it into your account creation process. You can set a last IP address to the account upon creation and login (on login in case their IP changes) and then do something like this on account creation:

Code: Select all

foreach account in ListAccounts()
	if (account.getprop("LastIP") == who.ip)
		//Don't create the account
	endif
endforeach
//Create the account
account.setprop("LastIP", who.ip)
be mindful that even with this, it's very easy to circumvent (VPNs or easily changeable dynamic IPs) and there really is no good way to ensure that each person has only one account.
yayafan
Novice Poster
Posts: 40
Joined: Sun Mar 15, 2015 2:26 am

Re: max account limitation per IP

Post by yayafan »

hello,

Thanks for your suggestion.

I want to create a script that can limit the numbers of same IP , such as 2 or 3. I will try to write one.

BR!
User avatar
*Edwards
Forum Regular
Posts: 303
Joined: Fri Dec 28, 2007 11:19 pm
Location: Montreal, Canada

Re: max account limitation per IP

Post by *Edwards »

guialtran
Grandmaster Poster
Posts: 120
Joined: Wed Jul 30, 2008 12:42 pm

Re: max account limitation per IP

Post by guialtran »

call this in your LOGON and reconnect

Code: Select all


function checkiponline( who )
	var maxipson := 2;//Catching on your CFG
	var address := who.ip;
    var ips := 0;
	foreach player in ( EnumerateOnlineCharacters() )
		if( player.ip == address )
			ips += 1;
			if( ips > maxipson )
				return 0;//to disconnect
			endif
		endif
	endforeach
	return 1;//do not disconnect
endfunction
yayafan
Novice Poster
Posts: 40
Joined: Sun Mar 15, 2015 2:26 am

Re: max account limitation per IP

Post by yayafan »

Thank to everyone above!
Post Reply