ID:143817
 
Code:
world
New()
..()
spawn(-1)
KeyBanLoad()
IPBanLoad()
mob/Login()
..()
usr<<"test"
var/options=list()
var/savefile/S=new("Saves/[ckey(key)].sav")
if(S.dir.Find("player"))
options += "Load Character"
options += "Delete Character"
else
options += "New Character"
usr<<"test"
AdminCheck(src)
BanCheck(src)
CharHandle(options)
spawn(-1)
if(!AllowMultikeys)
usr<<"test"
var/list/keys=list()
for(var/mob/M in world)
if(M.client.address==src.client.address)
keys+=M.key
if(!M.client.address&src.client.address=="127.0.0.1")
keys+=M.key
if(keys.len==1)
usr << "Sorry, someone is already logged on from your IP address and an admin has disabled multi-keys, \
have the person that is already logged in from your IP (eg. you use the same router) ask an admin to \
allow you to enter."

MultikeyLog(src.key,keys[1],src.client.address,"denied")
del(src)
else if(keys.len>1)
usr << "Sorry, someone is already logged on from your IP address and an admin has disabled multi-keys, \
have the person that is already logged in from your IP (eg. you use the same router) ask an admin to \
allow you to enter."

MultikeyLog(src.key,,src.client.address,"denied",keys)
del(src)
else
usr<<"Multikey check: Succeeded"
var/list/keys=list()
for(var/mob/M in world)
if(M.client.address==src.client.address)
keys+=M.key
if(!M.client.address&src.client.address=="127.0.0.1")
keys+=M.key
if(keys.len>0)
MultikeyLog(key1=src.key,address=src.client.address,allowed="allowed",keys=keys)


Problem description:

For some reason, whenever I run the world it closes immediately, I tried putting test outputs in world/New() and mob/Login() but nothing at all happened, can someone please help me?
If the world closes immediately its because you're using del(src) on your own mob, so you're getting logged out. If you want to test stuff, then replace the del(src) with some debug messages. If they don't show up properly, try adding a brief spawn(10) before them so they'll show up after you're logged in properly.
In response to Foomer
var/list/IPS = list()
client/New()
. = ..()
if(address in IPS)
src << "No multikeying"
del(src)
IPS.Add(address)
client/Del()
. = ..()
IPS.Remove(address)

pretty easy mirite?
In response to Xx Dark Wizard xX
Heck yes O_O Why didn't I think of that? All I'd have to do is add logging, and allow for if multikeying is turned on...
In response to Foomer
I put the debug messages at the top of mob/Login and they never got called, and I have nothing in client/New() (I moved it to mob/Login when the problem occured to try to fix it) so I don't see that will fix it, but I'll try, also I found out that it runs perfectly in Dream Daemon, I can log into the world hosted by dream daemon aswell.