diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index 1753045cb8c..8ac165cec6a 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -24,5 +24,6 @@ #define DISABLE_SCOREBOARD 2048 #define DISABLE_KARMA_REMINDER 4096 #define MEMBER_PUBLIC 8192 +#define CHAT_NO_ADMINLOGS 16384 #define TOGGLES_DEFAULT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS|CHAT_LOOC|MEMBER_PUBLIC) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 4427e694ffd..9b455078292 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -8,8 +8,9 @@ var/global/nologevent = 0 msg = "ADMIN LOG: [msg]" log_adminwarn(msg) for(var/client/C in admins) - if(R_SERVER & C.holder.rights) - to_chat(C, msg) + if(R_ADMIN & C.holder.rights) + if(!(C.prefs.toggles & CHAT_NO_ADMINLOGS)) + to_chat(C, msg) /proc/msg_admin_attack(var/text) //Toggleable Attack Messages log_attack(text) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 1c24e8cf214..90ad26039db 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -56,6 +56,7 @@ var/list/admin_verbs_admin = list( /datum/admins/proc/show_player_notes, /client/proc/free_slot, /*frees slot for chosen job*/ /client/proc/toggleattacklogs, + /client/proc/toggleadminlogs, /client/proc/toggledebuglogs, /client/proc/update_mob_sprite, /client/proc/toggledrones, @@ -883,6 +884,20 @@ var/list/admin_verbs_snpc = list( else to_chat(usr, "You now won't get attack log messages") +/client/proc/toggleadminlogs() + set name = "Toggle Admin Log Messages" + set category = "Preferences" + + if(!check_rights(R_ADMIN)) + return + + prefs.toggles ^= CHAT_NO_ADMINLOGS + prefs.save_preferences(src) + if(prefs.toggles & CHAT_NO_ADMINLOGS) + to_chat(usr, "You now won't get admin log messages.") + else + to_chat(usr, "You now will get admin log messages.") + /client/proc/toggledrones() set name = "Toggle Maintenance Drones" set category = "Server" diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index 5cbb8dd26d5..2512171e80d 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -24,7 +24,8 @@ admin_forcemove(usr, T) log_admin("[key_name(usr)] jumped to [A]") - message_admins("[key_name_admin(usr)] jumped to [A]") + if(!isobserver(usr)) + message_admins("[key_name_admin(usr)] jumped to [A]") feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/jumptoturf(var/turf/T in world) @@ -35,7 +36,8 @@ return log_admin("[key_name(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]") - message_admins("[key_name_admin(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]", 1) + if(!isobserver(usr)) + message_admins("[key_name_admin(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]", 1) admin_forcemove(usr, T) feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return @@ -48,7 +50,8 @@ return log_admin("[key_name(usr)] jumped to [key_name(M)]") - message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1) + if(!isobserver(usr)) + message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1) if(src.mob) var/mob/A = src.mob var/turf/T = get_turf(M) @@ -69,7 +72,8 @@ if(T) admin_forcemove(usr, T) feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]") + if(!isobserver(usr)) + message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]") /client/proc/jumptokey() set category = "Admin" @@ -87,7 +91,8 @@ return var/mob/M = selection:mob log_admin("[key_name(usr)] jumped to [key_name(M)]") - message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1) + if(!isobserver(usr)) + message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1) admin_forcemove(usr, M.loc)