ID:1162908
 
Keywords: address, ip, key, login, multi
(See the best response by Kaiochao.)
Code:
var/list/IP_Address[] = new()//Teporary logging of IP Addresses
var/Maximum_Addresses_Allowed = 2//Only 1 person on at a time
//You can change how many people are allowed at a time by changing the number.
//Never set to 0, otherwise no one can login
client
New()
if(address)//If the person logging in has a address, because when you host your address is null and makes this entire thing mess up
if(IP_Address.Find("[address]") && IP_Address["[address]"]>0)
IP_Address["[address]"]++//Add how many people on that address
if(IP_Address["[address]"]>Maximum_Addresses_Allowed)//Checks to see how many can login
src<<"<font color=red>You can only have a maximum of [Maximum_Addresses_Allowed] keys on at a time.</font>"//Message they get before being booted
del(src)//Obivious...
else
IP_Address["[address]"] = 1//When they login, they're going to have a character logged in anyway if they're not trying to multikey
..()
Del()
if(address && IP_Address.Find("[address]"))
IP_Address["[address]"]--//Subtract the people so they can log out and login with a different key or the same key
if(IP_Address["[address]"]<=0)//Check it
IP_Address -= "[address]"//Take their address out of it
..()


Problem description:

I added this so people wouldn't multi-key on the same computer, but I have a player who has a family of 7( dif computers) and they all play BYOND and only 2 of them can play at a time. Is there a way to make it so if they have different computers and same IP they can still ALL play
Best response
Try computer_id instead. It's unique to computers, rather than network stuff.


Also, since address and computer_id are text variables, you don't need to convert them to text to be used as list keys.
thanx