diff --git a/code/defines/global.dm b/code/defines/global.dm index 263d5f4e95d..63a9ea07674 100644 --- a/code/defines/global.dm +++ b/code/defines/global.dm @@ -64,6 +64,7 @@ var /////////////// diary = null + diaryofmeanpeople = null station_name = null game_version = "Baystation 12" diff --git a/code/defines/procs/logging.dm b/code/defines/procs/logging.dm index 277982ab981..0bedd4a942b 100644 --- a/code/defines/procs/logging.dm +++ b/code/defines/procs/logging.dm @@ -1,28 +1,48 @@ /proc/log_admin(text) admin_log.Add(text) if (config.log_admin) - diary << "ADMIN: [text]" + diary << "\[[time_stamp()]]ADMIN: [text]" /proc/log_game(text) if (config.log_game) - diary << "GAME: [text]" + diary << "\[[time_stamp()]]GAME: [text]" /proc/log_vote(text) if (config.log_vote) - diary << "VOTE: [text]" + diary << "\[[time_stamp()]]VOTE: [text]" /proc/log_access(text) if (config.log_access) - diary << "ACCESS: [text]" + diary << "\[[time_stamp()]]ACCESS: [text]" /proc/log_say(text) if (config.log_say) - diary << "SAY: [text]" + diary << "\[[time_stamp()]]SAY: [text]" /proc/log_ooc(text) if (config.log_ooc) - diary << "OOC: [text]" + diary << "\[[time_stamp()]]OOC: [text]" /proc/log_whisper(text) if (config.log_whisper) - diary << "WHISPER: [text]" \ No newline at end of file + diary << "\[[time_stamp()]]WHISPER: [text]" + +/proc/log_emote(text) + if (config.log_emote) + diary << "\[[time_stamp()]]EMOTE: [text]" + +/proc/log_attack(text) + if (config.log_attack) + diaryofmeanpeople << "\[[time_stamp()]]ATTACK: [text]" + +/proc/log_adminsay(text) + if (config.log_adminchat) + diary << "\[[time_stamp()]]ADMINSAY: [text]" + +/proc/log_adminwarn(text) + if (config.log_adminwarn) + diary << "\[[time_stamp()]]ADMINWARN: [text]" + +/proc/log_pda(text) + if (config.log_pda) + diary << "\[[time_stamp()]]PDA: [text]" \ No newline at end of file diff --git a/code/game/algorithm.dm b/code/game/algorithm.dm index 92cbd2dde55..4a5851d9036 100644 --- a/code/game/algorithm.dm +++ b/code/game/algorithm.dm @@ -9,6 +9,19 @@ Starting up. [time2text(world.timeofday, "hh:mm.ss")] "} + diaryofmeanpeople = file("data/logs/[time2text(world.realtime, "YYYY/MM-Month/DD-Day")] Attack.log") + + diaryofmeanpeople << {" + +Starting up. [time2text(world.timeofday, "hh:mm.ss")] +--------------------- +Dear Diary.... +Today, these people were mean: + +"} + + + jobban_loadbanfile() jobban_updatelegacybans() LoadBans() diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index bab9a374b25..cd6f4358678 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -2758,6 +2758,25 @@ var/global/BSACooldown = 0 onclose(usr,"server_logfile") return +/obj/admins/proc/view_atk_log() + set category = "Admin" + set desc="Shows todays server attack log in new window" + set name="Show Server Attack Log" + var/path = "data/logs/[time2text(world.realtime,"YYYY")]/[time2text(world.realtime,"MM")]-[time2text(world.realtime,"Month")]/[time2text(world.realtime,"DD")]-[time2text(world.realtime,"Day")] Attack.log" + var/output = {" +
++ [file2text(path)] ++ + "} + usr << browse(output,"window=server_logfile") + onclose(usr,"server_logfile") + return + /*/client/proc/unjobban_panel() set name = "Unjobban Panel" set category = "Admin" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index e9749719099..dad5b5d5601 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -145,6 +145,7 @@ if (holder.level >= 5)//Game Admin******************************************************************** verbs += /obj/admins/proc/view_txt_log + verbs += /obj/admins/proc/view_atk_log //verbs += /client/proc/cmd_mass_modify_object_variables --Merged with view variables verbs += /client/proc/cmd_admin_list_open_jobs verbs += /client/proc/cmd_admin_direct_narrate