diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index 1fdbbbaa60e..f1b92bdfaa1 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -28,8 +28,9 @@ GLOBAL_PROTECT(log_end) #define testing(msg) #endif -/proc/log_admin(text) - GLOB.admin_log.Add(text) +/proc/log_admin(text, skip_glob = FALSE) + if(!skip_glob) + GLOB.admin_log.Add(text) if(GLOB.configuration.logging.admin_logging) rustg_log_write(GLOB.world_game_log, "ADMIN: [text][GLOB.log_end]") diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm index e56461dca34..75ca819c27a 100644 --- a/code/game/verbs/who.dm +++ b/code/game/verbs/who.dm @@ -112,10 +112,10 @@ for(var/client/C in GLOB.admins) if(check_rights(R_ADMIN, 0, C.mob)) - if(C.holder.fakekey && !check_rights(R_ADMIN, 0)) //Mentors can't see stealthmins + if(C?.holder?.fakekey && !check_rights(R_ADMIN, 0)) //Mentors can't see stealthmins continue - if(C.holder.big_brother && !check_rights(R_PERMISSIONS, 0)) // normal admins can't see BB + if(C?.holder?.big_brother && !check_rights(R_PERMISSIONS, FALSE)) // normal admins can't see BB continue // Their rank may not have a defined colour, only set colour if so diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index b1f28b70a9a..c0122c20c77 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -649,8 +649,11 @@ GLOBAL_LIST_INIT(view_runtimes_verbs, list( new_key = copytext(new_key, 1, 26) holder.fakekey = new_key holder.big_brother = 1 + if(isobserver(mob)) + mob.invisibility = 90 + mob.see_invisible = 90 createStealthKey() - log_admin("[key_name(usr)] has turned BB mode [holder.fakekey ? "ON" : "OFF"]") + log_admin("[key_name(usr)] has turned BB mode [holder.fakekey ? "ON" : "OFF"]", TRUE) SSblackbox.record_feedback("tally", "admin_verb", 1, "Big Brother Mode") /client/proc/drop_bomb() // Some admin dickery that can probably be done better -- TLE diff --git a/code/modules/admin/misc_admin_procs.dm b/code/modules/admin/misc_admin_procs.dm index 11ff0c37bb6..4360db3a8f1 100644 --- a/code/modules/admin/misc_admin_procs.dm +++ b/code/modules/admin/misc_admin_procs.dm @@ -76,13 +76,19 @@ GLOBAL_VAR_INIT(nologevent, 0) if(!check_rights(R_ADMIN|R_MOD)) return + var/our_key = M.key + if(M.client && M.client.holder) + if(M.client.holder.fakekey && M.client.holder.big_brother) + our_key = M.client.holder.fakekey - var/body = "Options for [M.key]" + var/body = "Options for [our_key]" body += "Options panel for [M]" if(M.client) body += " played by [M.client] " - if(check_rights(R_PERMISSIONS, 0)) + if(check_rights(R_PERMISSIONS, FALSE)) body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] " + else if(M.client.holder && M.client.holder.fakekey && M.client.holder.big_brother) + body += "\[Player\] " else body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] " body += "\[" + M.client.get_exp_type(EXP_TYPE_CREW) + " as [EXP_TYPE_CREW]\]" diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 3b33c728713..a0ec7b9637d 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -225,6 +225,9 @@ var/i = 1 for(var/mob/M in mobs) if(M.ckey) + if(M.client) + if(M.client?.holder?.big_brother && !check_rights(R_PERMISSIONS, FALSE)) // normal admins can't see BB + continue var/color = "#e6e6e6" if(i%2 == 0) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index f45f123f57d..debe72dcfc1 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -41,6 +41,8 @@ return var/list/client/targets[0] for(var/client/T) + if(T?.holder?.big_brother && !check_rights(R_PERMISSIONS, FALSE)) // normal admins can't see BB + continue if(T.mob) if(isnewplayer(T.mob)) targets["[T] - (New Player)"] = T