Added three utilities for admins & developers

- There is a new option in the player panel labeled "Send back to
   Lobby", which will send a given player back to the lobby.
 - The player panel also has a shortcut to the "Spawn Character" verb.
 - Finally, there's a new config option that disables the warning
   message about multikeying if two mobs with the same CID are found;
   this option should NOT be enabled if multikeying is prohibited by the
   server rules. It is simply a developer tool, as multikeying is
   sometimes necessary to test new features that require two clients
   interacting.
This commit is contained in:
ShadowLarkens
2020-03-27 16:11:28 -07:00
parent dfda8ea952
commit 777f56e86c
6 changed files with 54 additions and 4 deletions
+3
View File
@@ -75,6 +75,7 @@ proc/admin_notice(var/message, var/rights)
if(M.client)
body += "| <A HREF='?src=\ref[src];sendtoprison=\ref[M]'>Prison</A> | "
body += "\ <A HREF='?src=\ref[src];sendbacktolobby=\ref[M]'>Send back to Lobby</A> | "
var/muted = M.client.prefs.muted
body += {"<br><b>Mute: </b>
\[<A href='?src=\ref[src];mute=\ref[M];mute_type=[MUTE_IC]'><font color='[(muted & MUTE_IC)?"red":"blue"]'>IC</font></a> |
@@ -128,6 +129,8 @@ proc/admin_notice(var/message, var/rights)
else
body += "<A href='?src=\ref[src];makeanimal=\ref[M]'>Animalize</A> | "
body += "<A href='?src=\ref[src];respawn=\ref[M.client]'>Respawn</A> | "
// DNA2 - Admin Hax
if(M.dna && iscarbon(M))
body += "<br><br>"
+32
View File
@@ -1035,6 +1035,29 @@
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.")
message_admins("<font color='blue'>[key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.</font>", 1)
else if(href_list["sendbacktolobby"])
if(!check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["sendbacktolobby"])
if(!isobserver(M))
to_chat(usr, "<span class='notice'>You can only send ghost players back to the Lobby.</span>")
return
if(!M.client)
to_chat(usr, "<span class='warning'>[M] doesn't seem to have an active client.</span>")
return
if(alert(usr, "Send [key_name(M)] back to Lobby?", "Message", "Yes", "No") != "Yes")
return
log_admin("[key_name(usr)] has sent [key_name(M)] back to the Lobby.")
message_admins("[key_name(usr)] has sent [key_name(M)] back to the Lobby.")
var/mob/new_player/NP = new()
NP.ckey = M.ckey
qdel(M)
else if(href_list["tdome1"])
if(!check_rights(R_FUN)) return
@@ -1193,6 +1216,15 @@
usr.client.cmd_admin_animalize(M)
else if(href_list["respawn"])
if(!check_rights(R_SPAWN))
return
var/client/C = locate(href_list["respawn"])
if(!istype(C))
return
usr.client.respawn_character_proper(C)
else if(href_list["togmutate"])
if(!check_rights(R_SPAWN)) return
+8 -2
View File
@@ -369,12 +369,18 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!holder)
return
//I frontload all the questions so we don't have a half-done process while you're reading.
var/client/picked_client = input(src, "Please specify which client's character to spawn.", "Client", "") as null|anything in GLOB.clients
if(!picked_client)
return
var/location = alert(src,"Please specify where to spawn them.", "Location", "Right Here", "Arrivals", "Cancel")
respawn_character_proper(picked_client)
/client/proc/respawn_character_proper(client/picked_client)
if(!istype(picked_client))
return
//I frontload all the questions so we don't have a half-done process while you're reading.
var/location = alert(src, "Please specify where to spawn them.", "Location", "Right Here", "Arrivals", "Cancel")
if(location == "Cancel" || !location)
return
+2 -1
View File
@@ -14,7 +14,8 @@
if( (client.connection != "web") && (M.computer_id == client.computer_id) )
if(matches) matches += " and "
matches += "ID ([client.computer_id])"
spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!")
if(!config.disable_cid_warn_popup)
spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!")
if(matches)
if(M.client)
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'>[key_name_admin(src)] has the same [matches] as [key_name_admin(M)].</font>", 1)