diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 989d52052d1..0adc4ab8ac3 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -300,7 +300,7 @@ var/global/datum/controller/gameticker/ticker if(!delay_end) sleep(restart_timeout) - kick_clients_in_lobby("\red The round came to an end with you in the lobby.") + kick_clients_in_lobby("\red The round came to an end with you in the lobby.", 1) //second parameter ensures only afk clients are kicked world.Reboot() else world << "\blue An admin has delayed the round end" diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 2e63e3ad9a0..6573b732c30 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -221,7 +221,7 @@ var/bomb_set blackbox.save_all_data_to_sql() sleep(300) log_game("Rebooting due to nuclear detonation") - kick_clients_in_lobby("\red The round came to an end with you in the lobby.") + kick_clients_in_lobby("\red The round came to an end with you in the lobby.", 1) //second parameter ensures only afk clients are kicked world.Reboot() return return diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index fa2296f84b2..d2d469670ae 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -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) \ No newline at end of file + kicked_client_names.Add("[C.ckey]") + del(C) + return kicked_client_names \ No newline at end of file diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 20cacf25400..78f2c1d9ee0 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -194,7 +194,7 @@