mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
Missing VGWS API calls.
This commit is contained in:
@@ -234,7 +234,8 @@ var/global/floorIsLava = 0
|
||||
return
|
||||
checkSessionKey()
|
||||
var/cid = input("Type computer ID", "CID", 0)
|
||||
usr << link("[config.vgws_base_url]/index.php/rapsheet/?s=[sessKey]&cid=[cid]")
|
||||
usr << link(getVGPanel("rapsheet",admin=1,query=list("cid"=cid)))
|
||||
//usr << link("[config.vgws_base_url]/index.php/rapsheet/?s=[sessKey]&cid=[cid]")
|
||||
return
|
||||
|
||||
/datum/admins/proc/checkCKEY()
|
||||
@@ -249,7 +250,8 @@ var/global/floorIsLava = 0
|
||||
return
|
||||
checkSessionKey()
|
||||
var/ckey = lowertext(input("Type player ckey", "ckey", null) as text | null)
|
||||
usr << link("[config.vgws_base_url]/index.php/rapsheet/?s=[sessKey]&ckey=[ckey]")
|
||||
usr << link(getVGPanel("rapsheet",admin=1,query=list("ckey"=ckey)))
|
||||
//usr << link("[config.vgws_base_url]/index.php/rapsheet/?s=[sessKey]&ckey=[ckey]")
|
||||
return
|
||||
|
||||
/datum/admins/proc/PlayerNotesPage(page)
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
#ifdef __OPENBYOND
|
||||
// The idea is to eventually be able to call
|
||||
//user << VGPanel(...)
|
||||
// instead of
|
||||
//user << link(GetVGPanel(...))
|
||||
// But OpenBYOND isn't ready yet.
|
||||
#define VGPanel(...) link(getVGPanel(__VA_ARGS__))
|
||||
#endif
|
||||
|
||||
// Usage:
|
||||
// user << link(getVGPanel("route"[, admin=1][, query=list("get_var"="value")]))
|
||||
// Turns into:
|
||||
// [config.vgws_base_url]/index.php/route?get_var=value
|
||||
// s is automatically added when admin=1.
|
||||
/datum/admins/proc/getVGPanel(var/route,var/list/query=list(),var/admin=0)
|
||||
checkSessionKey()
|
||||
var/url="[config.vgws_base_url]/index.php/[route]"
|
||||
|
||||
//usr << link("[config.vgws_base_url]/index.php/rapsheet/?s=[sessKey]&ckey=[ckey]")
|
||||
|
||||
if(admin)
|
||||
query["s"]=sessKey
|
||||
url += buildurlquery(query)
|
||||
|
||||
Reference in New Issue
Block a user