ID:322288
 
(See the best response by Neimo.)


    Logout()
world<<"<b>Chat Info:</b>[src.key] has quit [world.name]"
Online -= src
Players -= 1
for(var/mob/M in world)
M.Update_Who()
del(src)
..()

Best response
return-ing to the default procedure after deleting src would cause the problem you are having?

In my opinion you should be using client/Del() for this type of thing.

client/Del()
world << "[src] has logged out."
onlineplayers.Remove(src.mob) or onlineplayers -= src.mob // personal preference is Remove()
players -- is the same thing as players -= 1

for(var/mob/m in world) // you should loop through clients instead
if(m.client) // you should be checking if they are client here
m.updatewho() // this loop will cause a delay before the actual client logs

..()