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:
Erthilo
2012-06-06 22:20:34 +01:00
parent 6ce8634883
commit d4810cb90c
3 changed files with 36 additions and 19 deletions

View File

@@ -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/datacore/data_core = null
var/global/obj/effect/overlay/plmaster = null var/global/obj/effect/overlay/plmaster = null
@@ -80,7 +80,7 @@ var/aliens_allowed = 1
var/ooc_allowed = 1 var/ooc_allowed = 1
var/dooc_allowed = 1 var/dooc_allowed = 1
var/traitor_scaling = 1 var/traitor_scaling = 1
var/goonsay_allowed = 0 //var/goonsay_allowed = 0
var/dna_ident = 1 var/dna_ident = 1
var/abandon_allowed = 1 var/abandon_allowed = 1
var/enter_allowed = 1 var/enter_allowed = 1

View File

@@ -9,13 +9,7 @@
//SYSTEM //SYSTEM
/proc/investigate_subject2file(var/subject) /proc/investigate_subject2file(var/subject)
switch(subject) return file("[INVESTIGATE_DIR][subject].html")
if("singulo")
return file("[INVESTIGATE_DIR]singulo.html")
if("silicon")
return file("[INVESTIGATE_DIR]silicon.html")
else
return
/proc/investigate_reset() /proc/investigate_reset()
if(fdel(INVESTIGATE_DIR)) return 1 if(fdel(INVESTIGATE_DIR)) return 1
@@ -27,17 +21,26 @@
if(!F) return if(!F) return
F << "<small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>" F << "<small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
//ADMINVERBS //ADMINVERBS
/client/proc/investigate_show( subject in list("singulo","silicon") ) /client/proc/investigate_show( subject in list("hrefs","singulo") )
set name = "Investigate" set name = "Investigate"
set category = "Admin" set category = "Admin"
if(!holder) return if(!holder) return
var/F = investigate_subject2file(subject) switch(subject)
if(!F) if("singulo") //general one-round-only stuff
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>" var/F = investigate_subject2file(subject)
return if(!F)
src << browse(F,"window=investigate;size=800x300") 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[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

View File

@@ -307,6 +307,7 @@
verbs += /client/proc/giveruntimelog //used by coders to retrieve runtime logs verbs += /client/proc/giveruntimelog //used by coders to retrieve runtime logs
verbs += /client/proc/cinematic //show a cinematic sequence 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/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/enable_debug_verbs
verbs += /client/proc/kill_air verbs += /client/proc/kill_air
verbs += /client/proc/callprocgen verbs += /client/proc/callprocgen
@@ -440,7 +441,8 @@
verbs -= /client/proc/getserverlog verbs -= /client/proc/getserverlog
verbs -= /client/proc/cinematic //show a cinematic sequence verbs -= /client/proc/cinematic //show a cinematic sequence
verbs -= /client/proc/admin_memo 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/cmd_admin_change_custom_event
verbs -= /client/proc/admin_invis verbs -= /client/proc/admin_invis
verbs -= /client/proc/callprocgen 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! // feedback_add_details("admin_verb","TAVVH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return 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() /client/proc/admin_invis()
set category = "Admin" set category = "Admin"
set name = "Invisibility" set name = "Invisibility"