interface
BanInfoA ban entry's value: expiry + reason. until === 0 = permanent, else unix-second expiry.
until: numberreason: string@s2script/sdk/bans
Host-global SteamID64 ban cache. Bans.add updates the cache then attempts persistence (void; no rollback). Bans.remove returns whether a cache key existed, not disk ACK.
import { BanInfo } from "@s2script/sdk/bans";Author-time types ship in the npm package; the engine injects the runtime at plugin load.
Add @s2script/sdk to your plugin's dependencies.
Generated from the shipped type definitions.
BanInfoA ban entry's value: expiry + reason. until === 0 = permanent, else unix-second expiry.
until: numberreason: stringBanEntryA ban entry as listed by Bans.list(): the SteamID64 plus its value.
steamid: stringuntil: numberreason: stringBansThe ban API: add/remove bans, look up by SteamID64, list, and reload from bans.json.
import { Bans } from "@s2script/sdk/bans";
// Connect-time enforcement inside a Clients.onConnect handler.
const b = Bans.get(c.steamId);
if (b && (b.until === 0 || b.until > Date.now() / 1000)) c.kickWithReason(b.reason);add(steamId: string, minutes: number, reason?: string): voidminutes <= 0 = permanent.remove(steamId: string): booleanget(steamId: string): BanInfo | nulllist(): BanEntry[]reload(): void