mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 02:01:22 +00:00
persistent investigate and game logs separated by round ID
This commit is contained in:
@@ -20,13 +20,13 @@
|
|||||||
/proc/log_admin(text)
|
/proc/log_admin(text)
|
||||||
GLOB.admin_log.Add(text)
|
GLOB.admin_log.Add(text)
|
||||||
if (config.log_admin)
|
if (config.log_admin)
|
||||||
GLOB.diary << "\[[time_stamp()]]ADMIN: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]ADMIN: [text]"
|
||||||
|
|
||||||
//Items using this proc are stripped from public logs - use with caution
|
//Items using this proc are stripped from public logs - use with caution
|
||||||
/proc/log_admin_private(text)
|
/proc/log_admin_private(text)
|
||||||
GLOB.admin_log.Add(text)
|
GLOB.admin_log.Add(text)
|
||||||
if (config.log_admin)
|
if (config.log_admin)
|
||||||
GLOB.diary << "\[[time_stamp()]]ADMINPRIVATE: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]ADMINPRIVATE: [text]"
|
||||||
|
|
||||||
/proc/log_adminsay(text)
|
/proc/log_adminsay(text)
|
||||||
if (config.log_adminchat)
|
if (config.log_adminchat)
|
||||||
@@ -38,67 +38,64 @@
|
|||||||
|
|
||||||
/proc/log_game(text)
|
/proc/log_game(text)
|
||||||
if (config.log_game)
|
if (config.log_game)
|
||||||
GLOB.diary << "\[[time_stamp()]]GAME: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]GAME: [text]"
|
||||||
|
|
||||||
/proc/log_vote(text)
|
/proc/log_vote(text)
|
||||||
if (config.log_vote)
|
if (config.log_vote)
|
||||||
GLOB.diary << "\[[time_stamp()]]VOTE: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]VOTE: [text]"
|
||||||
|
|
||||||
/proc/log_access(text)
|
/proc/log_access(text)
|
||||||
if (config.log_access)
|
if (config.log_access)
|
||||||
GLOB.diary << "\[[time_stamp()]]ACCESS: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]ACCESS: [text]"
|
||||||
|
|
||||||
/proc/log_say(text)
|
/proc/log_say(text)
|
||||||
if (config.log_say)
|
if (config.log_say)
|
||||||
GLOB.diary << "\[[time_stamp()]]SAY: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]SAY: [text]"
|
||||||
|
|
||||||
/proc/log_prayer(text)
|
/proc/log_prayer(text)
|
||||||
if (config.log_prayer)
|
if (config.log_prayer)
|
||||||
GLOB.diary << "\[[time_stamp()]]PRAY: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]PRAY: [text]"
|
||||||
|
|
||||||
/proc/log_law(text)
|
/proc/log_law(text)
|
||||||
if (config.log_law)
|
if (config.log_law)
|
||||||
GLOB.diary << "\[[time_stamp()]]LAW: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]LAW: [text]"
|
||||||
|
|
||||||
/proc/log_ooc(text)
|
/proc/log_ooc(text)
|
||||||
if (config.log_ooc)
|
if (config.log_ooc)
|
||||||
GLOB.diary << "\[[time_stamp()]]OOC: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]OOC: [text]"
|
||||||
|
|
||||||
/proc/log_whisper(text)
|
/proc/log_whisper(text)
|
||||||
if (config.log_whisper)
|
if (config.log_whisper)
|
||||||
GLOB.diary << "\[[time_stamp()]]WHISPER: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]WHISPER: [text]"
|
||||||
|
|
||||||
/proc/log_emote(text)
|
/proc/log_emote(text)
|
||||||
if (config.log_emote)
|
if (config.log_emote)
|
||||||
GLOB.diary << "\[[time_stamp()]]EMOTE: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]EMOTE: [text]"
|
||||||
|
|
||||||
/proc/log_attack(text)
|
/proc/log_attack(text)
|
||||||
if (config.log_attack)
|
if (config.log_attack)
|
||||||
GLOB.diaryofmeanpeople << "\[[time_stamp()]]ATTACK: [text]"
|
GLOB.world_attack_log << "\[[time_stamp()]]ATTACK: [text]"
|
||||||
|
|
||||||
/proc/log_pda(text)
|
/proc/log_pda(text)
|
||||||
if (config.log_pda)
|
if (config.log_pda)
|
||||||
GLOB.diary << "\[[time_stamp()]]PDA: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]PDA: [text]"
|
||||||
|
|
||||||
/proc/log_comment(text)
|
/proc/log_comment(text)
|
||||||
if (config.log_pda)
|
if (config.log_pda)
|
||||||
//reusing the PDA option because I really don't think news comments are worth a config option
|
//reusing the PDA option because I really don't think news comments are worth a config option
|
||||||
GLOB.diary << "\[[time_stamp()]]COMMENT: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]COMMENT: [text]"
|
||||||
|
|
||||||
/proc/log_chat(text)
|
/proc/log_chat(text)
|
||||||
if (config.log_pda)
|
if (config.log_pda)
|
||||||
GLOB.diary << "\[[time_stamp()]]CHAT: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]CHAT: [text]"
|
||||||
|
|
||||||
/proc/log_sql(text)
|
/proc/log_sql(text)
|
||||||
if(config.sql_enabled)
|
if(config.sql_enabled)
|
||||||
GLOB.diary << "\[[time_stamp()]]SQL: [text]"
|
GLOB.world_game_log << "\[[time_stamp()]]SQL: [text]"
|
||||||
|
|
||||||
//This replaces world.log so it displays both in DD and the file
|
//This replaces world.log so it displays both in DD and the file
|
||||||
/proc/log_world(text)
|
/proc/log_world(text)
|
||||||
if(config && config.log_runtimes)
|
GLOB.world_runtime_log << text
|
||||||
world.log = GLOB.runtime_diary
|
|
||||||
world.log << text
|
|
||||||
world.log = null
|
|
||||||
world.log << text
|
world.log << text
|
||||||
|
|
||||||
// Helper procs for building detailed log lines
|
// Helper procs for building detailed log lines
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
GLOBAL_VAR(diary)
|
GLOBAL_VAR(log_directory)
|
||||||
GLOBAL_PROTECT(diary)
|
GLOBAL_PROTECT(log_directory)
|
||||||
GLOBAL_VAR(runtime_diary)
|
GLOBAL_VAR(world_game_log)
|
||||||
GLOBAL_PROTECT(runtime_diary)
|
GLOBAL_PROTECT(world_game_log)
|
||||||
GLOBAL_VAR(diaryofmeanpeople)
|
GLOBAL_VAR(world_runtime_log)
|
||||||
GLOBAL_PROTECT(diaryofmeanpeople)
|
GLOBAL_PROTECT(world_runtime_log)
|
||||||
GLOBAL_VAR(href_logfile)
|
GLOBAL_VAR(world_attack_log)
|
||||||
GLOBAL_PROTECT(href_logfile)
|
GLOBAL_PROTECT(world_attack_log)
|
||||||
|
GLOBAL_VAR(world_href_log)
|
||||||
|
GLOBAL_PROTECT(world_href_log)
|
||||||
|
GLOBAL_VAR(round_id)
|
||||||
|
GLOBAL_PROTECT(round_id)
|
||||||
|
|
||||||
GLOBAL_LIST_EMPTY(bombers)
|
GLOBAL_LIST_EMPTY(bombers)
|
||||||
GLOBAL_PROTECT(bombers)
|
GLOBAL_PROTECT(bombers)
|
||||||
|
|||||||
@@ -43,10 +43,8 @@
|
|||||||
var/log_attack = 0 // log attack messages
|
var/log_attack = 0 // log attack messages
|
||||||
var/log_adminchat = 0 // log admin chat messages
|
var/log_adminchat = 0 // log admin chat messages
|
||||||
var/log_pda = 0 // log pda messages
|
var/log_pda = 0 // log pda messages
|
||||||
var/log_hrefs = 0 // log all links clicked in-game. Could be used for debugging and tracking down exploits
|
|
||||||
var/log_twitter = 0 // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases.
|
var/log_twitter = 0 // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases.
|
||||||
var/log_world_topic = 0 // log all world.Topic() calls
|
var/log_world_topic = 0 // log all world.Topic() calls
|
||||||
var/log_runtimes = FALSE // log runtimes into a file
|
|
||||||
var/sql_enabled = 0 // for sql switching
|
var/sql_enabled = 0 // for sql switching
|
||||||
var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour
|
var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour
|
||||||
var/allow_vote_restart = 0 // allow votes to restart
|
var/allow_vote_restart = 0 // allow votes to restart
|
||||||
@@ -271,7 +269,7 @@
|
|||||||
|
|
||||||
if(M.config_tag)
|
if(M.config_tag)
|
||||||
if(!(M.config_tag in modes)) // ensure each mode is added only once
|
if(!(M.config_tag in modes)) // ensure each mode is added only once
|
||||||
GLOB.diary << "Adding game mode [M.name] ([M.config_tag]) to configuration."
|
GLOB.world_game_log << "Adding game mode [M.name] ([M.config_tag]) to configuration."
|
||||||
modes += M.config_tag
|
modes += M.config_tag
|
||||||
mode_names[M.config_tag] = M.name
|
mode_names[M.config_tag] = M.name
|
||||||
probabilities[M.config_tag] = M.probability
|
probabilities[M.config_tag] = M.probability
|
||||||
@@ -360,8 +358,6 @@
|
|||||||
log_adminchat = 1
|
log_adminchat = 1
|
||||||
if("log_pda")
|
if("log_pda")
|
||||||
log_pda = 1
|
log_pda = 1
|
||||||
if("log_hrefs")
|
|
||||||
log_hrefs = 1
|
|
||||||
if("log_twitter")
|
if("log_twitter")
|
||||||
log_twitter = 1
|
log_twitter = 1
|
||||||
if("log_world_topic")
|
if("log_world_topic")
|
||||||
@@ -495,12 +491,6 @@
|
|||||||
ipintel_save_bad = text2num(value)
|
ipintel_save_bad = text2num(value)
|
||||||
if("aggressive_changelog")
|
if("aggressive_changelog")
|
||||||
aggressive_changelog = 1
|
aggressive_changelog = 1
|
||||||
if("log_runtimes")
|
|
||||||
log_runtimes = TRUE
|
|
||||||
var/newlog = file("data/logs/runtimes/runtime-[time2text(world.realtime, "YYYY-MM-DD")].log")
|
|
||||||
if(GLOB.runtime_diary != newlog)
|
|
||||||
world.log << "Now logging runtimes to data/logs/runtimes/runtime-[time2text(world.realtime, "YYYY-MM-DD")].log"
|
|
||||||
GLOB.runtime_diary = newlog
|
|
||||||
if("autoconvert_notes")
|
if("autoconvert_notes")
|
||||||
autoconvert_notes = 1
|
autoconvert_notes = 1
|
||||||
if("allow_webclient")
|
if("allow_webclient")
|
||||||
@@ -544,7 +534,7 @@
|
|||||||
if("error_msg_delay")
|
if("error_msg_delay")
|
||||||
error_msg_delay = text2num(value)
|
error_msg_delay = text2num(value)
|
||||||
else
|
else
|
||||||
GLOB.diary << "Unknown setting in configuration: '[name]'"
|
GLOB.world_game_log << "Unknown setting in configuration: '[name]'"
|
||||||
|
|
||||||
else if(type == "game_options")
|
else if(type == "game_options")
|
||||||
switch(name)
|
switch(name)
|
||||||
@@ -607,13 +597,13 @@
|
|||||||
if(mode_name in modes)
|
if(mode_name in modes)
|
||||||
continuous[mode_name] = 1
|
continuous[mode_name] = 1
|
||||||
else
|
else
|
||||||
GLOB.diary << "Unknown continuous configuration definition: [mode_name]."
|
GLOB.world_game_log << "Unknown continuous configuration definition: [mode_name]."
|
||||||
if("midround_antag")
|
if("midround_antag")
|
||||||
var/mode_name = lowertext(value)
|
var/mode_name = lowertext(value)
|
||||||
if(mode_name in modes)
|
if(mode_name in modes)
|
||||||
midround_antag[mode_name] = 1
|
midround_antag[mode_name] = 1
|
||||||
else
|
else
|
||||||
GLOB.diary << "Unknown midround antagonist configuration definition: [mode_name]."
|
GLOB.world_game_log << "Unknown midround antagonist configuration definition: [mode_name]."
|
||||||
if("midround_antag_time_check")
|
if("midround_antag_time_check")
|
||||||
midround_antag_time_check = text2num(value)
|
midround_antag_time_check = text2num(value)
|
||||||
if("midround_antag_life_check")
|
if("midround_antag_life_check")
|
||||||
@@ -629,9 +619,9 @@
|
|||||||
if(mode_name in modes)
|
if(mode_name in modes)
|
||||||
min_pop[mode_name] = text2num(mode_value)
|
min_pop[mode_name] = text2num(mode_value)
|
||||||
else
|
else
|
||||||
GLOB.diary << "Unknown minimum population configuration definition: [mode_name]."
|
GLOB.world_game_log << "Unknown minimum population configuration definition: [mode_name]."
|
||||||
else
|
else
|
||||||
GLOB.diary << "Incorrect minimum population configuration definition: [mode_name] [mode_value]."
|
GLOB.world_game_log << "Incorrect minimum population configuration definition: [mode_name] [mode_value]."
|
||||||
if("max_pop")
|
if("max_pop")
|
||||||
var/pop_pos = findtext(value, " ")
|
var/pop_pos = findtext(value, " ")
|
||||||
var/mode_name = null
|
var/mode_name = null
|
||||||
@@ -643,9 +633,9 @@
|
|||||||
if(mode_name in modes)
|
if(mode_name in modes)
|
||||||
max_pop[mode_name] = text2num(mode_value)
|
max_pop[mode_name] = text2num(mode_value)
|
||||||
else
|
else
|
||||||
GLOB.diary << "Unknown maximum population configuration definition: [mode_name]."
|
GLOB.world_game_log << "Unknown maximum population configuration definition: [mode_name]."
|
||||||
else
|
else
|
||||||
GLOB.diary << "Incorrect maximum population configuration definition: [mode_name] [mode_value]."
|
GLOB.world_game_log << "Incorrect maximum population configuration definition: [mode_name] [mode_value]."
|
||||||
if("shuttle_refuel_delay")
|
if("shuttle_refuel_delay")
|
||||||
shuttle_refuel_delay = text2num(value)
|
shuttle_refuel_delay = text2num(value)
|
||||||
if("show_game_type_odds")
|
if("show_game_type_odds")
|
||||||
@@ -673,9 +663,9 @@
|
|||||||
if(prob_name in modes)
|
if(prob_name in modes)
|
||||||
probabilities[prob_name] = text2num(prob_value)
|
probabilities[prob_name] = text2num(prob_value)
|
||||||
else
|
else
|
||||||
GLOB.diary << "Unknown game mode probability configuration definition: [prob_name]."
|
GLOB.world_game_log << "Unknown game mode probability configuration definition: [prob_name]."
|
||||||
else
|
else
|
||||||
GLOB.diary << "Incorrect probability configuration definition: [prob_name] [prob_value]."
|
GLOB.world_game_log << "Incorrect probability configuration definition: [prob_name] [prob_value]."
|
||||||
|
|
||||||
if("protect_roles_from_antagonist")
|
if("protect_roles_from_antagonist")
|
||||||
protect_roles_from_antagonist = 1
|
protect_roles_from_antagonist = 1
|
||||||
@@ -722,7 +712,7 @@
|
|||||||
// Value is in the form "LAWID,NUMBER"
|
// Value is in the form "LAWID,NUMBER"
|
||||||
var/list/L = splittext(value, ",")
|
var/list/L = splittext(value, ",")
|
||||||
if(L.len != 2)
|
if(L.len != 2)
|
||||||
GLOB.diary << "Invalid LAW_WEIGHT: " + t
|
GLOB.world_game_log << "Invalid LAW_WEIGHT: " + t
|
||||||
continue
|
continue
|
||||||
var/lawid = L[1]
|
var/lawid = L[1]
|
||||||
var/weight = text2num(L[2])
|
var/weight = text2num(L[2])
|
||||||
@@ -777,7 +767,7 @@
|
|||||||
if("mice_roundstart")
|
if("mice_roundstart")
|
||||||
mice_roundstart = text2num(value)
|
mice_roundstart = text2num(value)
|
||||||
else
|
else
|
||||||
GLOB.diary << "Unknown setting in configuration: '[name]'"
|
GLOB.world_game_log << "Unknown setting in configuration: '[name]'"
|
||||||
|
|
||||||
fps = round(fps)
|
fps = round(fps)
|
||||||
if(fps <= 0)
|
if(fps <= 0)
|
||||||
@@ -831,7 +821,7 @@
|
|||||||
maplist[currentmap.map_name] = currentmap
|
maplist[currentmap.map_name] = currentmap
|
||||||
currentmap = null
|
currentmap = null
|
||||||
else
|
else
|
||||||
GLOB.diary << "Unknown command in map vote config: '[command]'"
|
GLOB.world_game_log << "Unknown command in map vote config: '[command]'"
|
||||||
|
|
||||||
|
|
||||||
/datum/configuration/proc/loadsql(filename)
|
/datum/configuration/proc/loadsql(filename)
|
||||||
@@ -875,7 +865,7 @@
|
|||||||
if("feedback_tableprefix")
|
if("feedback_tableprefix")
|
||||||
global.sqlfdbktableprefix = value
|
global.sqlfdbktableprefix = value
|
||||||
else
|
else
|
||||||
GLOB.diary << "Unknown setting in configuration: '[name]'"
|
GLOB.world_game_log << "Unknown setting in configuration: '[name]'"
|
||||||
|
|
||||||
/datum/configuration/proc/pick_mode(mode_name)
|
/datum/configuration/proc/pick_mode(mode_name)
|
||||||
// I wish I didn't have to instance the game modes in order to look up
|
// I wish I didn't have to instance the game modes in order to look up
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ SUBSYSTEM_DEF(blackbox)
|
|||||||
msg_service = SSblackbox.msg_service
|
msg_service = SSblackbox.msg_service
|
||||||
msg_cargo = SSblackbox.msg_cargo
|
msg_cargo = SSblackbox.msg_cargo
|
||||||
msg_other = SSblackbox.msg_other
|
msg_other = SSblackbox.msg_other
|
||||||
|
|
||||||
feedback = SSblackbox.feedback
|
feedback = SSblackbox.feedback
|
||||||
|
|
||||||
//no touchie
|
//no touchie
|
||||||
@@ -84,25 +84,13 @@ SUBSYSTEM_DEF(blackbox)
|
|||||||
if (!SSdbcore.Connect())
|
if (!SSdbcore.Connect())
|
||||||
return
|
return
|
||||||
|
|
||||||
var/round_id
|
|
||||||
|
|
||||||
var/datum/DBQuery/query_feedback_max_id = SSdbcore.NewQuery("SELECT MAX(round_id) AS round_id FROM [format_table_name("feedback")]")
|
|
||||||
if(!query_feedback_max_id.Execute())
|
|
||||||
return
|
|
||||||
while (query_feedback_max_id.NextRow())
|
|
||||||
round_id = query_feedback_max_id.item[1]
|
|
||||||
|
|
||||||
if (!isnum(round_id))
|
|
||||||
round_id = text2num(round_id)
|
|
||||||
round_id++
|
|
||||||
|
|
||||||
var/sqlrowlist = ""
|
var/sqlrowlist = ""
|
||||||
|
|
||||||
for (var/datum/feedback_variable/FV in feedback)
|
for (var/datum/feedback_variable/FV in feedback)
|
||||||
if (sqlrowlist != "")
|
if (sqlrowlist != "")
|
||||||
sqlrowlist += ", " //a comma (,) at the start of the first row to insert will trigger a SQL error
|
sqlrowlist += ", " //a comma (,) at the start of the first row to insert will trigger a SQL error
|
||||||
|
|
||||||
sqlrowlist += "(null, Now(), [round_id], \"[sanitizeSQL(FV.get_variable())]\", [FV.get_value()], \"[sanitizeSQL(FV.get_details())]\")"
|
sqlrowlist += "(null, Now(), [GLOB.round_id], \"[sanitizeSQL(FV.get_variable())]\", [FV.get_value()], \"[sanitizeSQL(FV.get_details())]\")"
|
||||||
|
|
||||||
if (sqlrowlist == "")
|
if (sqlrowlist == "")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -85,7 +85,6 @@
|
|||||||
SSblackbox.set_details("game_mode","[SSticker.mode]")
|
SSblackbox.set_details("game_mode","[SSticker.mode]")
|
||||||
if(GLOB.revdata.commit)
|
if(GLOB.revdata.commit)
|
||||||
SSblackbox.set_details("revision","[GLOB.revdata.commit]")
|
SSblackbox.set_details("revision","[GLOB.revdata.commit]")
|
||||||
SSblackbox.set_details("server_ip","[world.internet_address]:[world.port]")
|
|
||||||
if(report)
|
if(report)
|
||||||
addtimer(CALLBACK(src, .proc/send_intercept, 0), rand(waittime_l, waittime_h))
|
addtimer(CALLBACK(src, .proc/send_intercept, 0), rand(waittime_l, waittime_h))
|
||||||
generate_station_goals()
|
generate_station_goals()
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
if(!SSdbcore.Connect())
|
if(!SSdbcore.Connect())
|
||||||
log_world("Ban database connection failure. Key [ckeytext] not checked")
|
log_world("Ban database connection failure. Key [ckeytext] not checked")
|
||||||
GLOB.diary << "Ban database connection failure. Key [ckeytext] not checked"
|
GLOB.world_game_log << "Ban database connection failure. Key [ckeytext] not checked"
|
||||||
return
|
return
|
||||||
|
|
||||||
var/ipquery = ""
|
var/ipquery = ""
|
||||||
|
|||||||
@@ -1,50 +1,20 @@
|
|||||||
//By Carnwennan
|
atom/proc/investigate_log(message, subject)
|
||||||
|
if(!message || !subject)
|
||||||
//This system was made as an alternative to all the in-game lists and variables used to log stuff in-game.
|
|
||||||
//lists and variables are great. However, they have several major flaws:
|
|
||||||
//Firstly, they use memory. TGstation has one of the highest memory usage of all the ss13 branches.
|
|
||||||
//Secondly, they are usually stored in an object. This means that they aren't centralised. It also means that
|
|
||||||
//the data is lost when the object is deleted! This is especially annoying for things like the singulo engine!
|
|
||||||
#define INVESTIGATE_DIR "data/investigate/"
|
|
||||||
|
|
||||||
//SYSTEM
|
|
||||||
/proc/investigate_subject2file(subject)
|
|
||||||
return file("[INVESTIGATE_DIR][subject].html")
|
|
||||||
|
|
||||||
/proc/investigate_reset()
|
|
||||||
if(fdel(INVESTIGATE_DIR))
|
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
/atom/proc/investigate_log(message, subject)
|
|
||||||
if(!message)
|
|
||||||
return
|
|
||||||
var/F = investigate_subject2file(subject)
|
|
||||||
if(!F)
|
|
||||||
return
|
return
|
||||||
|
var/F = file("[GLOB.log_directory]/[subject].html")
|
||||||
F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
|
F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
|
||||||
|
|
||||||
//ADMINVERBS
|
|
||||||
/client/proc/investigate_show( subject in list("hrefs","notes, memos, watchlist","singulo","wires","telesci", "gravity", "records", "cargo", "supermatter", "atmos", "experimentor", "kudzu") )
|
/client/proc/investigate_show( subject in list("hrefs","notes, memos, watchlist","singulo","wires","telesci", "gravity", "records", "cargo", "supermatter", "atmos", "experimentor", "kudzu") )
|
||||||
set name = "Investigate"
|
set name = "Investigate"
|
||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
if(!holder)
|
if(!holder)
|
||||||
return
|
return
|
||||||
switch(subject)
|
switch(subject)
|
||||||
if("singulo", "wires", "telesci", "gravity", "records", "cargo", "supermatter", "atmos", "botany") //general one-round-only stuff
|
|
||||||
var/F = investigate_subject2file(subject)
|
|
||||||
if(!F)
|
|
||||||
to_chat(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") //persistent logs and stuff
|
|
||||||
if(GLOB.href_logfile)
|
|
||||||
src << browse(GLOB.href_logfile,"window=investigate[subject];size=800x300")
|
|
||||||
else if(!config.log_hrefs)
|
|
||||||
to_chat(src, "<span class='danger'>Href logging is off and no logfile was found.</span>")
|
|
||||||
return
|
|
||||||
else
|
|
||||||
to_chat(src, "<span class='danger'>No href logfile was found.</span>")
|
|
||||||
return
|
|
||||||
if("notes, memos, watchlist")
|
if("notes, memos, watchlist")
|
||||||
browse_messages()
|
browse_messages()
|
||||||
|
else
|
||||||
|
var/F = file("[GLOB.log_directory]/[subject].html")
|
||||||
|
if(!fexists(F))
|
||||||
|
to_chat(src, "<span class='danger'>No [subject] logfile was found.</span>")
|
||||||
|
return
|
||||||
|
src << browse(F,"window=investigate[subject];size=800x300")
|
||||||
@@ -127,7 +127,7 @@ GLOBAL_PROTECT(admin_ranks)
|
|||||||
else
|
else
|
||||||
if(!SSdbcore.Connect())
|
if(!SSdbcore.Connect())
|
||||||
log_world("Failed to connect to database in load_admin_ranks(). Reverting to legacy system.")
|
log_world("Failed to connect to database in load_admin_ranks(). Reverting to legacy system.")
|
||||||
GLOB.diary << "Failed to connect to database in load_admin_ranks(). Reverting to legacy system."
|
GLOB.world_game_log << "Failed to connect to database in load_admin_ranks(). Reverting to legacy system."
|
||||||
config.admin_legacy_system = 1
|
config.admin_legacy_system = 1
|
||||||
load_admin_ranks()
|
load_admin_ranks()
|
||||||
return
|
return
|
||||||
@@ -202,7 +202,7 @@ GLOBAL_PROTECT(admin_ranks)
|
|||||||
else
|
else
|
||||||
if(!SSdbcore.Connect())
|
if(!SSdbcore.Connect())
|
||||||
log_world("Failed to connect to database in load_admins(). Reverting to legacy system.")
|
log_world("Failed to connect to database in load_admins(). Reverting to legacy system.")
|
||||||
GLOB.diary << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
GLOB.world_game_log << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
||||||
config.admin_legacy_system = 1
|
config.admin_legacy_system = 1
|
||||||
load_admins()
|
load_admins()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -42,16 +42,14 @@ GLOBAL_LIST_INIT(admin_verbs_admin, AVerbsAdmin())
|
|||||||
/datum/admins/proc/set_admin_notice,/*announcement all clients see when joining the server.*/
|
/datum/admins/proc/set_admin_notice,/*announcement all clients see when joining the server.*/
|
||||||
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
|
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
|
||||||
/client/proc/toggle_view_range, /*changes how far we can see*/
|
/client/proc/toggle_view_range, /*changes how far we can see*/
|
||||||
/datum/admins/proc/view_txt_log, /*shows the server log (diary) for today*/
|
/datum/admins/proc/view_txt_log, /*shows the server log (world_game_log) for today*/
|
||||||
/datum/admins/proc/view_atk_log, /*shows the server combat-log, doesn't do anything presently*/
|
/datum/admins/proc/view_atk_log, /*shows the server combat-log, doesn't do anything presently*/
|
||||||
/client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/
|
/client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/
|
||||||
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
|
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
|
||||||
/client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/
|
/client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/
|
||||||
/client/proc/check_antagonists, /*shows all antags*/
|
/client/proc/check_antagonists, /*shows all antags*/
|
||||||
/datum/admins/proc/access_news_network, /*allows access of newscasters*/
|
/datum/admins/proc/access_news_network, /*allows access of newscasters*/
|
||||||
/client/proc/giveruntimelog, /*allows us to give access to runtime logs to somebody*/
|
/client/proc/getserverlog, /*allows us to fetch server logs (world_game_log) for other days*/
|
||||||
/client/proc/getruntimelog, /*allows us to access runtime logs to somebody*/
|
|
||||||
/client/proc/getserverlog, /*allows us to fetch server logs (diary) for other days*/
|
|
||||||
/client/proc/jumptocoord, /*we ghost and jump to a coordinate*/
|
/client/proc/jumptocoord, /*we ghost and jump to a coordinate*/
|
||||||
/client/proc/Getmob, /*teleports a mob to our location*/
|
/client/proc/Getmob, /*teleports a mob to our location*/
|
||||||
/client/proc/Getkey, /*teleports a mob with a certain ckey to our location*/
|
/client/proc/Getkey, /*teleports a mob with a certain ckey to our location*/
|
||||||
@@ -114,7 +112,6 @@ GLOBAL_LIST_INIT(admin_verbs_server, AVerbsServer())
|
|||||||
/datum/admins/proc/end_round,
|
/datum/admins/proc/end_round,
|
||||||
/datum/admins/proc/delay,
|
/datum/admins/proc/delay,
|
||||||
/datum/admins/proc/toggleaban,
|
/datum/admins/proc/toggleaban,
|
||||||
/client/proc/toggle_log_hrefs,
|
|
||||||
/client/proc/everyone_random,
|
/client/proc/everyone_random,
|
||||||
/datum/admins/proc/toggleAI,
|
/datum/admins/proc/toggleAI,
|
||||||
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
|
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
|
||||||
@@ -219,7 +216,6 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, AVerbsHideable())
|
|||||||
/datum/admins/proc/restart,
|
/datum/admins/proc/restart,
|
||||||
/datum/admins/proc/delay,
|
/datum/admins/proc/delay,
|
||||||
/datum/admins/proc/toggleaban,
|
/datum/admins/proc/toggleaban,
|
||||||
/client/proc/toggle_log_hrefs,
|
|
||||||
/client/proc/everyone_random,
|
/client/proc/everyone_random,
|
||||||
/datum/admins/proc/toggleAI,
|
/datum/admins/proc/toggleAI,
|
||||||
/client/proc/restart_controller,
|
/client/proc/restart_controller,
|
||||||
@@ -634,19 +630,6 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, AVerbsHideable())
|
|||||||
togglebuildmode(src.mob)
|
togglebuildmode(src.mob)
|
||||||
SSblackbox.add_details("admin_verb","Toggle Build Mode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
SSblackbox.add_details("admin_verb","Toggle Build Mode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|
||||||
/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
|
|
||||||
to_chat(src, "<b>Stopped logging hrefs</b>")
|
|
||||||
else
|
|
||||||
config.log_hrefs = 1
|
|
||||||
to_chat(src, "<b>Started logging hrefs</b>")
|
|
||||||
|
|
||||||
/client/proc/check_ai_laws()
|
/client/proc/check_ai_laws()
|
||||||
set name = "Check AI Laws"
|
set name = "Check AI Laws"
|
||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
|
|||||||
@@ -1,62 +1,3 @@
|
|||||||
/*
|
|
||||||
HOW DO I LOG RUNTIMES?
|
|
||||||
Firstly, start dreamdeamon if it isn't already running. Then select "world>Log Session" (or press the F3 key)
|
|
||||||
navigate the popup window to the data/logs/runtimes/ folder from where your tgstation .dmb is located.
|
|
||||||
(you may have to make this folder yourself)
|
|
||||||
|
|
||||||
OPTIONAL: you can select the little checkbox down the bottom to make dreamdeamon save the log everytime you
|
|
||||||
start a world. Just remember to repeat these steps with a new name when you update to a new revision!
|
|
||||||
|
|
||||||
Save it with the name of the revision your server uses (e.g. r3459.txt).
|
|
||||||
Game Masters will now be able to grant access any runtime logs you have archived this way!
|
|
||||||
This will allow us to gather information on bugs across multiple servers and make maintaining the TG
|
|
||||||
codebase for the entire /TG/station commuity a TONNE easier :3 Thanks for your help!
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
//This proc allows Game Masters to grant a client access to the .getruntimelog verb
|
|
||||||
//Permissions expire at the end of each round.
|
|
||||||
//Runtimes can be used to meta or spot game-crashing exploits so it's advised to only grant coders that
|
|
||||||
//you trust access. Also, it may be wise to ensure that they are not going to play in the current round.
|
|
||||||
/client/proc/giveruntimelog()
|
|
||||||
set name = ".giveruntimelog"
|
|
||||||
set desc = "Give somebody access to any session logfiles saved to the /log/runtime/ folder."
|
|
||||||
set category = null
|
|
||||||
|
|
||||||
if(!src.holder)
|
|
||||||
to_chat(src, "<font color='red'>Only Admins may use this command.</font>")
|
|
||||||
return
|
|
||||||
|
|
||||||
var/client/target = input(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions",null) as null|anything in GLOB.clients
|
|
||||||
if(!istype(target,/client))
|
|
||||||
to_chat(src, "<font color='red'>Error: giveruntimelog(): Client not found.</font>")
|
|
||||||
return
|
|
||||||
|
|
||||||
target.verbs |= /client/proc/getruntimelog
|
|
||||||
to_chat(target, "<font color='red'>You have been granted access to runtime logs. Please use them responsibly or risk being banned.</font>")
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
//This proc allows download of runtime logs saved within the data/logs/ folder by dreamdeamon.
|
|
||||||
//It works similarly to show-server-log.
|
|
||||||
/client/proc/getruntimelog()
|
|
||||||
set name = ".getruntimelog"
|
|
||||||
set desc = "Retrieve any session logfiles saved by dreamdeamon."
|
|
||||||
set category = null
|
|
||||||
|
|
||||||
var/path = browse_files("data/logs/runtimes/")
|
|
||||||
if(!path)
|
|
||||||
return
|
|
||||||
|
|
||||||
if(file_spam_check())
|
|
||||||
return
|
|
||||||
|
|
||||||
message_admins("[key_name_admin(src)] accessed file: [path]")
|
|
||||||
src << ftp(file(path))
|
|
||||||
to_chat(src, "Attempting to send file, this may take a fair few minutes if the file is very large.")
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
//This proc allows download of past server logs saved within the data/logs/ folder.
|
//This proc allows download of past server logs saved within the data/logs/ folder.
|
||||||
//It works similarly to show-server-log.
|
//It works similarly to show-server-log.
|
||||||
/client/proc/getserverlog()
|
/client/proc/getserverlog()
|
||||||
@@ -83,10 +24,10 @@
|
|||||||
/datum/admins/proc/view_txt_log()
|
/datum/admins/proc/view_txt_log()
|
||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
set name = "Show Server Log"
|
set name = "Show Server Log"
|
||||||
set desc = "Shows today's server log."
|
set desc = "Shows server log for this round."
|
||||||
|
|
||||||
if(fexists("[GLOB.diary]"))
|
if(fexists("[GLOB.world_game_log]"))
|
||||||
src << ftp(GLOB.diary)
|
src << ftp(GLOB.world_game_log)
|
||||||
else
|
else
|
||||||
to_chat(src, "<font color='red'>Server log not found, try using .getserverlog.</font>")
|
to_chat(src, "<font color='red'>Server log not found, try using .getserverlog.</font>")
|
||||||
return
|
return
|
||||||
@@ -97,10 +38,10 @@
|
|||||||
/datum/admins/proc/view_atk_log()
|
/datum/admins/proc/view_atk_log()
|
||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
set name = "Show Server Attack Log"
|
set name = "Show Server Attack Log"
|
||||||
set desc = "Shows today's server attack log."
|
set desc = "Shows server attack log for this round."
|
||||||
|
|
||||||
if(fexists("[GLOB.diaryofmeanpeople]"))
|
if(fexists("[GLOB.world_attack_log]"))
|
||||||
src << ftp(GLOB.diaryofmeanpeople)
|
src << ftp(GLOB.world_attack_log)
|
||||||
else
|
else
|
||||||
to_chat(src, "<font color='red'>Server attack log not found, try using .getserverlog.</font>")
|
to_chat(src, "<font color='red'>Server attack log not found, try using .getserverlog.</font>")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -70,8 +70,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
//Logs all hrefs
|
//Logs all hrefs
|
||||||
if(config && config.log_hrefs && GLOB.href_logfile)
|
GLOB.world_href_log << "<small>[time_stamp(show_ds = TRUE)] [src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]<br>"
|
||||||
GLOB.href_logfile << "<small>[time_stamp(show_ds = TRUE)] [src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]<br>"
|
|
||||||
|
|
||||||
// Admin PM
|
// Admin PM
|
||||||
if(href_list["priv_msg"])
|
if(href_list["priv_msg"])
|
||||||
@@ -270,13 +269,13 @@ GLOBAL_LIST(external_rsc_urls)
|
|||||||
set_client_age_from_db()
|
set_client_age_from_db()
|
||||||
var/cached_player_age = player_age //we have to cache this because other shit may change it and we need it's current value now down below.
|
var/cached_player_age = player_age //we have to cache this because other shit may change it and we need it's current value now down below.
|
||||||
if (isnum(cached_player_age) && cached_player_age == -1) //first connection
|
if (isnum(cached_player_age) && cached_player_age == -1) //first connection
|
||||||
player_age = 0
|
player_age = 0
|
||||||
if(!IsGuestKey(key) && SSdbcore.IsConnected())
|
if(!IsGuestKey(key) && SSdbcore.IsConnected())
|
||||||
findJoinDate()
|
findJoinDate()
|
||||||
|
|
||||||
sync_client_with_db(tdata)
|
sync_client_with_db(tdata)
|
||||||
|
|
||||||
|
|
||||||
if (isnum(cached_player_age) && cached_player_age == -1) //first connection
|
if (isnum(cached_player_age) && cached_player_age == -1) //first connection
|
||||||
if (config.panic_bunker && !holder && !(ckey in GLOB.deadmins))
|
if (config.panic_bunker && !holder && !(ckey in GLOB.deadmins))
|
||||||
log_access("Failed Login: [key] - New account attempting to connect during panic bunker")
|
log_access("Failed Login: [key] - New account attempting to connect during panic bunker")
|
||||||
@@ -295,7 +294,7 @@ GLOBAL_LIST(external_rsc_urls)
|
|||||||
send2irc_adminless_only("New-user", "[key_name(src)] is connecting for the first time!")
|
send2irc_adminless_only("New-user", "[key_name(src)] is connecting for the first time!")
|
||||||
else if (isnum(cached_player_age) && cached_player_age < config.notify_new_player_age)
|
else if (isnum(cached_player_age) && cached_player_age < config.notify_new_player_age)
|
||||||
message_admins("New user: [key_name_admin(src)] just connected with an age of [cached_player_age] day[(player_age==1?"":"s")]")
|
message_admins("New user: [key_name_admin(src)] just connected with an age of [cached_player_age] day[(player_age==1?"":"s")]")
|
||||||
|
|
||||||
get_message_output("watchlist entry", ckey)
|
get_message_output("watchlist entry", ckey)
|
||||||
check_ip_intel()
|
check_ip_intel()
|
||||||
|
|
||||||
@@ -340,7 +339,7 @@ GLOBAL_LIST(external_rsc_urls)
|
|||||||
adminGreet(1)
|
adminGreet(1)
|
||||||
holder.owner = null
|
holder.owner = null
|
||||||
GLOB.admins -= src
|
GLOB.admins -= src
|
||||||
|
|
||||||
if (!GLOB.admins.len && SSticker.IsRoundInProgress()) //Only report this stuff if we are currently playing.
|
if (!GLOB.admins.len && SSticker.IsRoundInProgress()) //Only report this stuff if we are currently playing.
|
||||||
if(!GLOB.admins.len) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
|
if(!GLOB.admins.len) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
|
||||||
var/cheesy_message = pick(
|
var/cheesy_message = pick(
|
||||||
@@ -357,9 +356,9 @@ GLOBAL_LIST(external_rsc_urls)
|
|||||||
"What happened? Where has everyone gone?",\
|
"What happened? Where has everyone gone?",\
|
||||||
"Forever alone :("\
|
"Forever alone :("\
|
||||||
)
|
)
|
||||||
|
|
||||||
send2irc("Server", "[cheesy_message] (No admins online)")
|
send2irc("Server", "[cheesy_message] (No admins online)")
|
||||||
|
|
||||||
GLOB.ahelp_tickets.ClientLogout(src)
|
GLOB.ahelp_tickets.ClientLogout(src)
|
||||||
GLOB.directory -= ckey
|
GLOB.directory -= ckey
|
||||||
GLOB.clients -= src
|
GLOB.clients -= src
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0)
|
|||||||
if(!istype(E)) //Something threw an unusual exception
|
if(!istype(E)) //Something threw an unusual exception
|
||||||
log_world("\[[time_stamp()]] Uncaught exception: [E]")
|
log_world("\[[time_stamp()]] Uncaught exception: [E]")
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
var/static/list/error_last_seen = list()
|
var/static/list/error_last_seen = list()
|
||||||
var/static/list/error_cooldown = list() /* Error_cooldown items will either be positive(cooldown time) or negative(silenced error)
|
var/static/list/error_cooldown = list() /* Error_cooldown items will either be positive(cooldown time) or negative(silenced error)
|
||||||
If negative, starts at -1, and goes down by 1 each time that error gets skipped*/
|
If negative, starts at -1, and goes down by 1 each time that error gets skipped*/
|
||||||
@@ -107,9 +107,8 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0)
|
|||||||
if (split[i] != "")
|
if (split[i] != "")
|
||||||
split[i] = "\[[time2text(world.timeofday,"hh:mm:ss")]\][split[i]]"
|
split[i] = "\[[time2text(world.timeofday,"hh:mm:ss")]\][split[i]]"
|
||||||
E.desc = jointext(split, "\n")
|
E.desc = jointext(split, "\n")
|
||||||
if(config && config.log_runtimes)
|
world.log = GLOB.world_runtime_log
|
||||||
world.log = GLOB.runtime_diary
|
..(E)
|
||||||
..(E)
|
|
||||||
|
|
||||||
world.log = null
|
world.log = null
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
break
|
break
|
||||||
|
|
||||||
if(!input_plate)
|
if(!input_plate)
|
||||||
GLOB.diary << "a [src] didn't find an input plate."
|
GLOB.world_game_log << "a [src] didn't find an input plate."
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/gibber/autogibber/Bumped(atom/A)
|
/obj/machinery/gibber/autogibber/Bumped(atom/A)
|
||||||
|
|||||||
@@ -25,17 +25,32 @@
|
|||||||
else
|
else
|
||||||
external_rsc_urls.Cut(i,i+1)
|
external_rsc_urls.Cut(i,i+1)
|
||||||
#endif
|
#endif
|
||||||
//logs
|
config = new
|
||||||
var/date_string = time2text(world.realtime, "YYYY/MM-Month/DD-Day")
|
GLOB.log_directory = "data/logs/[time2text(world.realtime, "YYYY/MM/DD")]/round-"
|
||||||
GLOB.href_logfile = file("data/logs/[date_string] hrefs.htm")
|
if(config.sql_enabled)
|
||||||
GLOB.diary = file("data/logs/[date_string].log")
|
if(SSdbcore.Connect())
|
||||||
GLOB.diaryofmeanpeople = file("data/logs/[date_string] Attack.log")
|
log_world("Database connection established.")
|
||||||
GLOB.diary << "\n\nStarting up. [time_stamp()]\n---------------------"
|
var/datum/DBQuery/query_feedback_create_round = SSdbcore.NewQuery("INSERT INTO [format_table_name("feedback")] SELECT null, Now(), MAX(round_id)+1, \"server_ip\", 0, \"[world.internet_address]:[world.port]\" FROM [format_table_name("feedback")]")
|
||||||
GLOB.diaryofmeanpeople << "\n\nStarting up. [time_stamp()]\n---------------------"
|
query_feedback_create_round.Execute()
|
||||||
|
var/datum/DBQuery/query_feedback_max_id = SSdbcore.NewQuery("SELECT MAX(round_id) FROM [format_table_name("feedback")]")
|
||||||
|
query_feedback_max_id.Execute()
|
||||||
|
if(query_feedback_max_id.NextRow())
|
||||||
|
GLOB.round_id = query_feedback_max_id.item[1]
|
||||||
|
GLOB.log_directory += "[GLOB.round_id]"
|
||||||
|
else
|
||||||
|
log_world("Your server failed to establish a connection with the database.")
|
||||||
|
if(!GLOB.round_id)
|
||||||
|
GLOB.log_directory += "[time_stamp()]"
|
||||||
|
GLOB.world_game_log = file("[GLOB.log_directory]/game.log")
|
||||||
|
GLOB.world_attack_log = file("[GLOB.log_directory]/attack.log")
|
||||||
|
GLOB.world_runtime_log = file("[GLOB.log_directory]/runtime.log")
|
||||||
|
GLOB.world_href_log = file("[GLOB.log_directory]/hrefs.html")
|
||||||
|
GLOB.world_game_log << "\n\nStarting up round ID [GLOB.round_id]. [time_stamp()]\n---------------------"
|
||||||
|
GLOB.world_attack_log << "\n\nStarting up round ID [GLOB.round_id]. [time_stamp()]\n---------------------"
|
||||||
|
GLOB.world_runtime_log << "\n\nStarting up round ID [GLOB.round_id]. [time_stamp()]\n---------------------"
|
||||||
GLOB.changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently
|
GLOB.changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently
|
||||||
|
|
||||||
make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once)
|
make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once)
|
||||||
config = new
|
|
||||||
GLOB.revdata.DownloadPRDetails()
|
GLOB.revdata.DownloadPRDetails()
|
||||||
load_mode()
|
load_mode()
|
||||||
load_motd()
|
load_motd()
|
||||||
@@ -43,17 +58,9 @@
|
|||||||
if(config.usewhitelist)
|
if(config.usewhitelist)
|
||||||
load_whitelist()
|
load_whitelist()
|
||||||
LoadBans()
|
LoadBans()
|
||||||
investigate_reset()
|
|
||||||
|
|
||||||
GLOB.timezoneOffset = text2num(time2text(0,"hh")) * 36000
|
GLOB.timezoneOffset = text2num(time2text(0,"hh")) * 36000
|
||||||
|
|
||||||
if(config.sql_enabled)
|
|
||||||
if(!SSdbcore.Connect())
|
|
||||||
log_world("Your server failed to establish a connection with the database.")
|
|
||||||
else
|
|
||||||
log_world("Database connection established.")
|
|
||||||
|
|
||||||
|
|
||||||
GLOB.data_core = new /datum/datacore()
|
GLOB.data_core = new /datum/datacore()
|
||||||
|
|
||||||
Master.Initialize(10, FALSE)
|
Master.Initialize(10, FALSE)
|
||||||
@@ -61,7 +68,7 @@
|
|||||||
#define IRC_STATUS_THROTTLE 50
|
#define IRC_STATUS_THROTTLE 50
|
||||||
/world/Topic(T, addr, master, key)
|
/world/Topic(T, addr, master, key)
|
||||||
if(config && config.log_world_topic)
|
if(config && config.log_world_topic)
|
||||||
GLOB.diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key]"
|
GLOB.world_game_log << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key]"
|
||||||
|
|
||||||
var/list/input = params2list(T)
|
var/list/input = params2list(T)
|
||||||
var/key_valid = (global.comms_allowed && input["key"] == global.comms_key)
|
var/key_valid = (global.comms_allowed && input["key"] == global.comms_key)
|
||||||
@@ -253,7 +260,7 @@
|
|||||||
if(Lines.len)
|
if(Lines.len)
|
||||||
if(Lines[1])
|
if(Lines[1])
|
||||||
GLOB.master_mode = Lines[1]
|
GLOB.master_mode = Lines[1]
|
||||||
GLOB.diary << "Saved mode is '[GLOB.master_mode]'"
|
GLOB.world_game_log << "Saved mode is '[GLOB.master_mode]'"
|
||||||
|
|
||||||
/world/proc/save_mode(the_mode)
|
/world/proc/save_mode(the_mode)
|
||||||
var/F = file("data/mode.txt")
|
var/F = file("data/mode.txt")
|
||||||
|
|||||||
@@ -71,9 +71,6 @@ LOG_PRAYER
|
|||||||
## log lawchanges
|
## log lawchanges
|
||||||
LOG_LAW
|
LOG_LAW
|
||||||
|
|
||||||
## log all Topic() calls (for use by coders in tracking down Topic issues)
|
|
||||||
# LOG_HREFS
|
|
||||||
|
|
||||||
## log all world.Topic() calls
|
## log all world.Topic() calls
|
||||||
# LOG_WORLD_TOPIC
|
# LOG_WORLD_TOPIC
|
||||||
|
|
||||||
@@ -272,9 +269,6 @@ PANIC_SERVER_NAME [Put the name here]
|
|||||||
## Uncomment to have the changelog file automatically open when a user connects and hasn't seen the latest changelog
|
## Uncomment to have the changelog file automatically open when a user connects and hasn't seen the latest changelog
|
||||||
#AGGRESSIVE_CHANGELOG
|
#AGGRESSIVE_CHANGELOG
|
||||||
|
|
||||||
## Uncomment to have the game log runtimes to the log folder. (Note: this disables normal output in dd/ds, so it should be left off for testing.
|
|
||||||
#LOG_RUNTIMES
|
|
||||||
|
|
||||||
## Comment this out if you've used the mass conversion sql proc for notes or want to stop converting notes
|
## Comment this out if you've used the mass conversion sql proc for notes or want to stop converting notes
|
||||||
AUTOCONVERT_NOTES
|
AUTOCONVERT_NOTES
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user