mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
- When clients in the lobby are kicked at round end, only afk clients actually get kicked.
- The admins now have the ability to kick all or just afk clients from the lobby - When admins use this action, a list of kicked clients is sent to admins and into the log. - Added a confirmation message to the admin command.
This commit is contained in:
@@ -842,10 +842,17 @@ proc/move_ferry()
|
||||
else
|
||||
ferry_location = 1
|
||||
|
||||
|
||||
proc/kick_clients_in_lobby(var/message)
|
||||
//Kicks all the clients currently in the lobby. The second parameter (kick_only_afk) determins if an is_afk() check is ran, or if all clients are kicked
|
||||
//defaults to kicking everyone (afk + non afk clients in the lobby)
|
||||
//returns a list of ckeys of the kicked clients
|
||||
proc/kick_clients_in_lobby(var/message, var/kick_only_afk = 0)
|
||||
var/list/kicked_client_names = list()
|
||||
for(var/client/C in clients)
|
||||
if(istype(C.mob, /mob/new_player))
|
||||
if(kick_only_afk && !C.is_afk()) //Ignore clients who are not afk
|
||||
continue
|
||||
if(message)
|
||||
C << message
|
||||
del(C)
|
||||
kicked_client_names.Add("[C.ckey]")
|
||||
del(C)
|
||||
return kicked_client_names
|
||||
Reference in New Issue
Block a user