Makes kicking more client than mob dependent

This commit is contained in:
TheSardele
2020-03-22 13:24:06 +01:00
parent 6c5801eb1f
commit cd23b41b20

View File

@@ -901,16 +901,19 @@
else if(href_list["boot2"])
var/mob/M = locateUID(href_list["boot2"])
if(ismob(M))
if(alert("Kick [M.ckey]?",,"Yes","No") == "Yes")
if(M.client && M.client.holder && (M.client.holder.rights & R_BAN))
to_chat(usr, "<span class='warning'>[key_name_admin(M)] cannot be kicked from the server.</span>")
return
to_chat(M, "<span class='warning'>You have been kicked from the server</span>")
log_admin("[key_name(usr)] booted [key_name(M)].")
message_admins("<span class='notice'>[key_name_admin(usr)] booted [key_name_admin(M)].</span>", 1)
//M.client = null
del(M.client)
var/client/C = M.client
if(C == null)
to_chat(usr, "<span class='warning'>Mob has no client to kick.</span>")
return
if(alert("Kick [C.ckey]?",,"Yes","No") == "Yes")
if(C && C.holder && (C.holder.rights & R_BAN))
to_chat(usr, "<span class='warning'>[key_name_admin(C)] cannot be kicked from the server.</span>")
return
to_chat(C, "<span class='warning'>You have been kicked from the server</span>")
log_admin("[key_name(usr)] booted [key_name(C)].")
message_admins("<span class='notice'>[key_name_admin(usr)] booted [key_name_admin(C)].</span>", 1)
//C = null
del(C)
//Player Notes
else if(href_list["addnote"])