mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Topic Kick
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user