ID:148573
 
Hey, anyone got any tips how to keep someone logging in with diff multiple keys? I tried this and no go...

for(var/mob/M in world)
if(M.client.address==src.client.address)
if(src.key=="Goku72")
else
del(src)

Any ideas?
furburger lol no ideas
Goku72 wrote:
Hey, anyone got any tips how to keep someone logging in with diff multiple keys? I tried this and no go...

for(var/mob/M in world)
if(M.client.address==src.client.address)
if(src.key=="Goku72")
else
del(src)

Any ideas?

Something like this ought to work. I'd keep a global players list so you don't have to loop through every mob in the world, but otherwise do something very similar:
for(var/mob/M in players)
if(!M || !M.client) // this shouldn't happen, but prepare for the worst
players-=M
continue
if(M.client.address==client.address)
if(client.ckey!="goku72") del(src)
players+=src
I can only assume however that src is the mob, and this code is being called during Login() or some such.

Lummox JR
In response to Lummox JR
lummox did u get the dime?