From d090d2134ae11e696f71d105d9ccc807e7c36f7d Mon Sep 17 00:00:00 2001 From: Alffd Date: Wed, 28 Jun 2017 19:48:28 -0400 Subject: [PATCH] Topic Kick --- code/world.dm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/code/world.dm b/code/world.dm index 34d61dbbc21..e293058cdf6 100644 --- a/code/world.dm +++ b/code/world.dm @@ -244,6 +244,27 @@ var/world_topic_spam_protect_time = world.timeofday for(var/client/C in clients) to_chat(C, "PR: [input["announce"]]") + else if("kick" in input) + /* + We have a kick request over coms. + Only needed portion is the ckey + */ + if(!key_valid) + return keySpamProtect(addr) + + var/client/C + + for(var/client/K in clients) + if(K.ckey == input["kick"]) + C = K + break + if(!C) + return "No client with that name on server" + + del(C) + + return "Kick Successful" + /proc/keySpamProtect(var/addr) if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50) spawn(50)