Page 1 of 1

max account limitation per IP

Posted: Mon Nov 20, 2017 11:33 pm
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!

Re: max account limitation per IP

Posted: Tue Nov 21, 2017 1:15 am
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.

Re: max account limitation per IP

Posted: Tue Nov 21, 2017 3:11 am
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!

Re: max account limitation per IP

Posted: Tue Nov 21, 2017 12:54 pm
by *Edwards

Re: max account limitation per IP

Posted: Tue Nov 21, 2017 1:37 pm
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

Re: max account limitation per IP

Posted: Tue Nov 21, 2017 3:51 pm
by yayafan
Thank to everyone above!