mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
TG: Added href logging as a config option. Log can be viewed via "investigate
hrefs". If on, it logs every link clicked. It may be useful for 'debugging' and spotting malicious clients. Anti-spam delay raised to 7 ticks. A little over half a second. Revision: r3722 Author: elly1...@rocketmail.com
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
var/global/obj/datacore/data_core = null
|
||||
var/global/obj/effect/overlay/plmaster = null
|
||||
@@ -80,7 +80,7 @@ var/aliens_allowed = 1
|
||||
var/ooc_allowed = 1
|
||||
var/dooc_allowed = 1
|
||||
var/traitor_scaling = 1
|
||||
var/goonsay_allowed = 0
|
||||
//var/goonsay_allowed = 0
|
||||
var/dna_ident = 1
|
||||
var/abandon_allowed = 1
|
||||
var/enter_allowed = 1
|
||||
|
||||
@@ -9,13 +9,7 @@
|
||||
|
||||
//SYSTEM
|
||||
/proc/investigate_subject2file(var/subject)
|
||||
switch(subject)
|
||||
if("singulo")
|
||||
return file("[INVESTIGATE_DIR]singulo.html")
|
||||
if("silicon")
|
||||
return file("[INVESTIGATE_DIR]silicon.html")
|
||||
else
|
||||
return
|
||||
return file("[INVESTIGATE_DIR][subject].html")
|
||||
|
||||
/proc/investigate_reset()
|
||||
if(fdel(INVESTIGATE_DIR)) return 1
|
||||
@@ -27,17 +21,26 @@
|
||||
if(!F) return
|
||||
F << "<small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
|
||||
|
||||
|
||||
|
||||
//ADMINVERBS
|
||||
/client/proc/investigate_show( subject in list("singulo","silicon") )
|
||||
/client/proc/investigate_show( subject in list("hrefs","singulo") )
|
||||
set name = "Investigate"
|
||||
set category = "Admin"
|
||||
if(!holder) return
|
||||
switch(subject)
|
||||
if("singulo") //general one-round-only stuff
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
|
||||
return
|
||||
src << browse(F,"window=investigate;size=800x300")
|
||||
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
|
||||
if("hrefs") //persistant logs and stuff
|
||||
if(config && config.log_hrefs)
|
||||
if(href_logfile)
|
||||
src << browse(href_logfile,"window=investigate[subject];size=800x300")
|
||||
else
|
||||
src << "<font color='red'>Error: admin_investigate: No href logfile found.</font>"
|
||||
return
|
||||
else
|
||||
src << "<font color='red'>Error: admin_investigate: Href Logging is not on.</font>"
|
||||
return
|
||||
|
||||
@@ -307,6 +307,7 @@
|
||||
verbs += /client/proc/giveruntimelog //used by coders to retrieve runtime logs
|
||||
verbs += /client/proc/cinematic //show a cinematic sequence
|
||||
verbs += /client/proc/startSinglo //Used to prevent the station from losing power while testing stuff out.
|
||||
verbs += /client/proc/toggle_log_hrefs
|
||||
verbs += /client/proc/enable_debug_verbs
|
||||
verbs += /client/proc/kill_air
|
||||
verbs += /client/proc/callprocgen
|
||||
@@ -440,7 +441,8 @@
|
||||
verbs -= /client/proc/getserverlog
|
||||
verbs -= /client/proc/cinematic //show a cinematic sequence
|
||||
verbs -= /client/proc/admin_memo
|
||||
verbs -= /client/proc/investigate_show
|
||||
verbs -= /client/proc/investigate_show //investigate in-game mishaps using various logs.
|
||||
verbs -= /client/proc/toggle_log_hrefs
|
||||
verbs -= /client/proc/cmd_admin_change_custom_event
|
||||
verbs -= /client/proc/admin_invis
|
||||
verbs -= /client/proc/callprocgen
|
||||
@@ -881,6 +883,18 @@
|
||||
// feedback_add_details("admin_verb","TAVVH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/toggle_log_hrefs()
|
||||
set name = "Toggle href logging"
|
||||
set category = "Server"
|
||||
if(!holder) return
|
||||
if(config)
|
||||
if(config.log_hrefs)
|
||||
config.log_hrefs = 0
|
||||
src << "<b>Stopped logging hrefs</b>"
|
||||
else
|
||||
config.log_hrefs = 1
|
||||
src << "<b>Started logging hrefs</b>"
|
||||
|
||||
/client/proc/admin_invis()
|
||||
set category = "Admin"
|
||||
set name = "Invisibility"
|
||||
|
||||
Reference in New Issue
Block a user