-- Whisper's tables, in CS2-SimpleAdmin's database. Applied once at load, tracked in wh_migrations. -- All times are UTC. -- One row per private message attempt, sent or not (while History is on in Whisper.json). -- result: sent, blocked, gagged, cooldown, no_target, ambiguous, group_target, too_long. -- The recipient columns are NULL when no single player was found. team: 0 none, 1 spectator, -- 2 T, 3 CT. alive: 1 when on T/CT with a living pawn. target is what the sender typed for it. CREATE TABLE IF NOT EXISTS `wh_messages` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `message_key` char(32) NOT NULL, `sent_at` datetime NOT NULL, `server_id` int NULL, `map` varchar(64) NOT NULL, `sender_steamid64` bigint unsigned NOT NULL, `sender_name` varchar(128) NOT NULL, `sender_team` tinyint NOT NULL, `sender_alive` tinyint NOT NULL, `recipient_steamid64` bigint unsigned NULL, `recipient_name` varchar(128) NULL, `recipient_team` tinyint NULL, `recipient_alive` tinyint NULL, `target` varchar(128) NOT NULL, `message` varchar(512) NOT NULL, `result` varchar(16) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uq_message_key` (`message_key`), KEY `ix_sent_at` (`sent_at`), KEY `ix_sender` (`sender_steamid64`, `sent_at`), KEY `ix_recipient` (`recipient_steamid64`, `sent_at`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- Who each player has blocked from messaging them (/block). blocked_name is their name when blocked, -- empty when blocked by SteamID64 while offline. CREATE TABLE IF NOT EXISTS `wh_blocks` ( `blocker_steamid64` bigint unsigned NOT NULL, `blocked_steamid64` bigint unsigned NOT NULL, `blocked_name` varchar(128) NOT NULL DEFAULT '', `created_at` datetime NOT NULL, PRIMARY KEY (`blocker_steamid64`, `blocked_steamid64`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;