ID:166342
 
How do I determine through code who is hosting a game, like to give them special verbs? I tried "if(src.client.address == world.address)" but that didn't work :(
You can do so by checking if the user's IP address is null, equal to the world's address, or is "localhost" or "127.0.0.1".

proc/ishost(client/C)
return (!C.address || C.address == world.address || C.address == "127.0.0.1")


And check on Login() if the player who's logging in is the host. If so, give them verbs, and such.

mob/Login()
if(ishost(src.client))
src << "You are the host!"
src.verbs += typesof(/mob/host/verb)
..()


~~> Unknown Person