diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 699bd90da66..9f5c9e82c31 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -76,6 +76,7 @@ var/global/floorIsLava = 0 if(M.client) body += "| Prison | " + body += "\ Send back to Lobby | " var/muted = M.client.prefs.muted body += {"
Mute: \[IC | diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index af018895af8..4b7b0eefb90 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2182,7 +2182,23 @@ to_chat(M, "You have been sent to the prison station!") log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.") message_admins("[key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.", 1) - + else if(href_list["sendbacktolobby"]) + if(!check_rights(R_ADMIN)) + return + var/mob/player_to_send = locate(href_list["sendbacktolobby"]) + if(!isobserver(player_to_send)) + to_chat(usr, span_notice("You can only send ghost players back to the Lobby.")) + return + if(!player_to_send.client) + to_chat(usr, span_warning("[player_to_send] doesn't seem to have an active client.")) + return + if(alert(usr, "Send [key_name(player_to_send)] back to Lobby?", "Message", "Yes", "No") != "Yes") + return + log_admin("[key_name(usr)] has sent [key_name(player_to_send)] back to the Lobby.") + message_admins("[key_name(usr)] has sent [key_name(player_to_send)] back to the Lobby.") + var/mob/new_player/new_lobby_player = new() + new_lobby_player.ckey = player_to_send.ckey + qdel(player_to_send) else if(href_list["tdome1"] || href_list["tdome2"]) if(!check_rights(R_FUN)) return