mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-29 19:11:51 +00:00
There's a certain issue of people spoofing real byond links to admins. Now all links should come with a generated key that is validated when the Topic is run. Added DEBUG_ADMIN_HREFS to debug this system while we test it (Allows hrefs without tokens and complains about it in the logs) Just add [HrefToken()] as a parameter to all admin hrefs. Anything that ends up running through VV or Holder will be verified
33 lines
1.6 KiB
Plaintext
33 lines
1.6 KiB
Plaintext
/proc/show_individual_logging_panel(mob/M, type = INDIVIDUAL_ATTACK_LOG)
|
|
if(!M || !ismob(M))
|
|
return
|
|
var/dat = "<center><a href='?_src_=holder;[HrefToken()];individuallog=\ref[M];log_type=[INDIVIDUAL_ATTACK_LOG]'>Attack log</a> | "
|
|
dat += "<a href='?_src_=holder;[HrefToken()];individuallog=\ref[M];log_type=[INDIVIDUAL_SAY_LOG]'>Say log</a> | "
|
|
dat += "<a href='?_src_=holder;[HrefToken()];individuallog=\ref[M];log_type=[INDIVIDUAL_EMOTE_LOG]'>Emote log</a> | "
|
|
dat += "<a href='?_src_=holder;[HrefToken()];individuallog=\ref[M];log_type=[INDIVIDUAL_OOC_LOG]'>OOC log</a> | "
|
|
dat += "<a href='?_src_=holder;[HrefToken()];individuallog=\ref[M];log_type=[INDIVIDUAL_SHOW_ALL_LOG]'>Show all</a> | "
|
|
dat += "<a href='?_src_=holder;[HrefToken()];individuallog=\ref[M];log_type=[type]'>Refresh</a></center>"
|
|
|
|
dat += "<hr style='background:#000000; border:0; height:1px'>"
|
|
|
|
|
|
if(type == INDIVIDUAL_SHOW_ALL_LOG)
|
|
dat += "<center>Displaying all logs of [key_name(M)]</center><br><hr>"
|
|
for(var/log_type in M.logging)
|
|
dat += "<center><b>[log_type]</b></center><br>"
|
|
var/list/reversed = M.logging[log_type]
|
|
if(islist(reversed))
|
|
reversed = reverseRange(reversed.Copy())
|
|
for(var/entry in reversed)
|
|
dat += "<font size=2px>[entry]: [reversed[entry]]</font><br>"
|
|
dat += "<hr>"
|
|
else
|
|
dat += "<center>[type] of [key_name(M)]</center><br>"
|
|
var/list/reversed = M.logging[type]
|
|
if(reversed)
|
|
reversed = reverseRange(reversed.Copy())
|
|
for(var/entry in reversed)
|
|
dat += "<font size=2px>[entry]: [reversed[entry]]</font><hr>"
|
|
|
|
usr << browse(dat, "window=invidual_logging_[M];size=600x480")
|