ID:154908
 
I'm unsure how to use shutdown at all.

I have a program uploaded on a shell server that I use to control the shell, and on there I have a verb 'StartHosting'
mob/verb
StartHosting(a as text,b as num,c as text)
startup(a,b,c)

To this I usually just input StartHosting("Blah.dmb",1561,"-trusted")

How would I go about closing this using the shutdown proc?

mob/verb
ShutDown(a as text,b as num)
shutdown(a,b)

I've tried Shutdown("blah.blah.blah.1561",0) | Shutdown("byond://blah.blah.blah.1561",0) | and Shutdown(1561,0)

So I'm confused. How does this work and interrelate? Any help and input is appreciated.
If you only want to shutdown the current world

shutdown(0) should work.

http://www.byond.com/ members/?command=reference&path=proc%2Fshutdown
In response to A.T.H.K
..its not the current world :/ its in the shell controler world as stated.
As stated in the reference entry for shutdown():
Addr: This is the address of the child world returned by startup()

So, you need to store that address so you can pass it to shutdown. Or you could try to figure it out after the fact (according to startup(), the form is "ip:port").

I would suggest keeping a list of worlds started, that you then pick from for you ShutDown() verb. datums would be perfect for this.
In response to EnvyAttraction
EnvyAttraction wrote:
..its not the current world :/ its in the shell controler world as stated.

That was why i supllied the reference..

If you have root access and have apache/php/mysql running you can do this via a web based system day as mine byondpanel.com