ID:156889
 
As the title states, how can I send an arg to Topic()? I know of this:
client/Topic(href)
if(href=="whatever")
//do stuff
//and inside the browser something like:
<a href=?whatever>click here for whatever</a>

But say I need to pass a variable into Topic(). How would I do that?
client/Topic(href,h[],hsrc)  //  Note that h[] is href_list, which is a list. href is a param
switch(h["command"])
if("suicide")
var/mob/M = hsrc
if(!M) M = src.mob
M.Suicide("Killed by [h["killer"]] for [h["reason"]]!"


mob/verb/Red_Button()
// Note that src after the ? tells who the mob is.
src << link({"?command=suicide;src=\ref[src];killer=[src.name];reason="Do not push the shiny red button""})

// Forgot if the reason will work like that or not

/*
The cleaner version of the above verb:
var/list/L = list()
L["command"] = "suicide"
L["src"] = "\ref[src]"
L["killer"] = src.name
L["reason"] = "Do not push the shiny red button"
src << link("?[list2params(L)]")
*/