mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
added send back to lobby button on player panel (#36396)
This commit is contained in:
@@ -76,6 +76,7 @@ var/global/floorIsLava = 0
|
||||
|
||||
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> |
|
||||
|
||||
@@ -2182,7 +2182,23 @@
|
||||
to_chat(M, "<span class='warning'>You have been sent to the prison station!</span>")
|
||||
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.</span>", 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
|
||||
|
||||
Reference in New Issue
Block a user