From 1fb0152c1d89dba7af2fb75c540f60595ab82e5b Mon Sep 17 00:00:00 2001
From: TheFurryFeline <38586851+TheFurryFeline@users.noreply.github.com>
Date: Fri, 12 Apr 2019 13:05:05 -0400
Subject: [PATCH] Admin Kick Command Fix
Ports https://github.com/PolarisSS13/Polaris/pull/6034 so that you don't accidentally kick someone off the server if you decide to change your mind.
---
code/modules/admin/topic.dm | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index c61ee1bb7f..3ecbcd4fb4 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -771,18 +771,19 @@
return 1
return 0 //we didn't do anything!
+//TFF: Ports Polaris fix for kicking so you can cancel without it still executing the command.
else if(href_list["boot2"])
var/mob/M = locate(href_list["boot2"])
if (ismob(M))
if(!check_if_greater_rights_than(M.client))
return
- var/reason = sanitize(input("Please enter reason"))
+ var/reason = sanitize(input("Please enter reason.") as null|message)
if(!reason)
- M << "You have been kicked from the server"
- else
- M << "You have been kicked from the server: [reason]"
- log_admin("[key_name(usr)] booted [key_name(M)].")
- message_admins("[key_name_admin(usr)] booted [key_name_admin(M)].", 1)
+ return
+
+ to_chat(M, span("critical", "You have been kicked from the server: [reason]"))
+ log_admin("[key_name(usr)] booted [key_name(M)] for reason: '[reason]'.")
+ message_admins("[key_name_admin(usr)] booted [key_name_admin(M)] for reason '[reason]'.", 1)
//M.client = null
qdel(M.client)