diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index dc8c26af71f..d75380939e6 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -468,12 +468,13 @@ Turf and target are seperate in case you want to teleport some distance from a t include_link = 0 if(key) - if(include_link) - . += "" - if(C && C.holder && C.holder.fakekey && !include_name) + if(include_link) + . += "" . += "Administrator" else + if(include_link) + . += "" . += key if(!C) . += "\[DC\]" diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm index 4ac067b1bfa..74b68d6b05b 100644 --- a/code/_globalvars/lists/mobs.dm +++ b/code/_globalvars/lists/mobs.dm @@ -1,13 +1,14 @@ -var/list/clients = list() //list of all clients -var/list/admins = list() //list of all clients whom are admins -var/list/deadmins = list() //list of all clients who have used the de-admin verb. -var/list/directory = list() //list of all ckeys with associated client +var/list/clients = list() //all clients +var/list/admins = list() //all clients whom are admins +var/list/deadmins = list() //all clients who have used the de-admin verb. +var/list/directory = list() //all ckeys with associated client +var/list/stealthminID = list() //reference list with IDs that store ckeys, for stealthmins //Since it didn't really belong in any other category, I'm putting this here //This is for procs to replace all the goddamn 'in world's that are chilling around the code -var/global/list/player_list = list() //List of all mobs **with clients attached**. Excludes /mob/new_player -var/global/list/mob_list = list() //List of all mobs, including clientless -var/global/list/living_mob_list = list() //List of all alive mobs, including clientless. Excludes /mob/new_player -var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless. Excludes /mob/new_player -var/global/list/joined_player_list = list() //List of all clients that have joined the game at round-start or as a latejoin. +var/global/list/player_list = list() //all mobs **with clients attached**. Excludes /mob/new_player +var/global/list/mob_list = list() //all mobs, including clientless +var/global/list/living_mob_list = list() //all alive mobs, including clientless. Excludes /mob/new_player +var/global/list/dead_mob_list = list() //all dead mobs, including clientless. Excludes /mob/new_player +var/global/list/joined_player_list = list() //all clients that have joined the game at round-start or as a latejoin. diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 9df8f53e3e9..46660a55909 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -383,6 +383,26 @@ var/list/admin_verbs_hideable = list( feedback_add_details("admin_verb","S") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return + +/client/proc/findStealthKey(txt) + if(txt) + for(var/P in stealthminID) + if(stealthminID[P] == txt) + return P + txt = stealthminID[ckey] + return txt + +/client/proc/createStealthKey() + var/num = (rand(0,1000)) + var/i = 0 + while(i == 0) + i = 1 + for(var/P in stealthminID) + if(num == stealthminID[P]) + num++ + i = 0 + stealthminID["[ckey]"] = "@[num2text(num)]" + /client/proc/stealth() set category = "Admin" set name = "Stealth Mode" @@ -395,6 +415,7 @@ var/list/admin_verbs_hideable = list( if(length(new_key) >= 26) new_key = copytext(new_key, 1, 26) holder.fakekey = new_key + createStealthKey() log_admin("[key_name(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]") message_admins("[key_name_admin(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]") feedback_add_details("admin_verb","SM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 39b8899c4b2..944677f2350 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -42,6 +42,8 @@ var/client/C if(istext(whom)) + if(cmptext(copytext(whom,1,2),"@")) + whom = findStealthKey(whom) C = directory[whom] else if(istype(whom,/client)) C = whom