From 9af151878ded57ac7fdc5238fcfd58957c9f9c8b Mon Sep 17 00:00:00 2001 From: Menshin Date: Wed, 28 Jan 2015 18:45:26 +0100 Subject: [PATCH] Added a "Send back to Lobby" option in Player Panel. --- code/modules/admin/admin.dm | 3 ++- code/modules/admin/topic.dm | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 28ce99bed4d..a05337f3f68 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -50,7 +50,8 @@ var/global/floorIsLava = 0 body += "Notes " if(M.client) - body += "| Prison | " + body += "| Prison | " + body += "\ Send back to Lobby | " var/muted = M.client.prefs.muted body += "
Mute: " body += "\[IC | " diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 49119c0109c..e5f076300f9 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1050,6 +1050,31 @@ log_admin("[key_name(usr)] has sent [key_name(M)] to Prison!") message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] Prison!") + + else if(href_list["sendbacktolobby"]) + if(!check_rights(R_ADMIN)) + return + + var/mob/M = locate(href_list["sendbacktolobby"]) + + if(!isobserver(M)) + usr << "You can only send ghost players back to the Lobby." + return + + if(!M.client) + usr << "[M] doesn't seem to have an active client." + 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