ID:935346
 
(See the best response by Boubi.)
Problem description:How would you code it so that whoever is hosting a server gets the staff verbs?

Best response
Using the world.host variable you can determine who is hosting the server and reward them verbs wherever you need to.
In response to Boubi (#1)
world.host or world.address are both ways to find the host.
Let me detail it to you.

mob
Login()
if(usr.key==world.host)
usr.verbs += typesof(/mob/(Put the title of the verbs here)/verb/)
In response to Audio freak XD (#3)
You should probably refrain from using usr in procs and instead use src.
Doesn't even matter.
You could also do something like this:
proc/isHost(mob/x)
if(world.internet_address==x.client.address||world.address==x.client.address||!x.client.address||world.host==x.key||x.client.address=="127.0.0.1")
return 1

mob/Login() if(isHost(src)) //do host stuff
Serviasnape wrote:
Problem description:How would you code it so that whoever is hosting a server gets the staff verbs?

mob/Login()
if(src.key==world.host)
src.verbs+=typesof(/mob/Host/verb)

In response to Audio freak XD (#5)
Oh, usually it works just fine for me for usr.key and stuff.
In response to Audio freak XD (#9)
What I'm trying to point out is that you shouldn't start bad habits, it was just for future reference.