diff --git a/src/commands/kickall.ts b/src/commands/kickall.ts new file mode 100644 index 0000000..4be2536 --- /dev/null +++ b/src/commands/kickall.ts @@ -0,0 +1,14 @@ +import SRServer from "../server/kcp/SRServer"; +import Logger from "../util/Logger"; +import { Command } from "./Interface"; +const c = new Logger("/kickall", "blue"); + +export default async function handle(command: Command) { + const hard = command.args[0]; + + for (const [key, session] of SRServer.getInstance().sessions) { + session.kick(!!hard); + } + + c.log(`Kicked all players. Hard kick: ${!!hard}`); +} \ No newline at end of file