Topic Kick

This commit is contained in:
Alffd
2017-06-28 20:15:07 -04:00
parent db6717ae0c
commit d090d2134a
+21
View File
@@ -244,6 +244,27 @@ var/world_topic_spam_protect_time = world.timeofday
for(var/client/C in clients)
to_chat(C, "<span class='announce'>PR: [input["announce"]]</span>")
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)