Steam rate-limits its community member lists by IP (429), so the whole-list download is gone. Each player is checked as they join with ISteamUser/GetUserGroupList: a member's 'group' row is added or refreshed, a non-member's deleted, and when Steam won't say (private profile, bad key, outage) the database stands. A player is asked about at most once per min_forced_refresh_seconds; css_verify rechecks its targets, offline SteamIDs too. Changing the group clears the old group's rows. refresh_minutes is gone. The Web API key goes in configs/plugins/GroupVerify/GroupVerify.json (SteamWebApiKey); every other setting stays in the database. New clan_tag setting and css_gv_clantag <tag|-> (@css/root): the scoreboard tag for verified players without a rank, applied by CS2-Tags. The API gains ClanTag and OnClanTagChanged, so shared/GroupVerifyApi changes: needs a server restart.
29 lines
1.7 KiB
SQL
29 lines
1.7 KiB
SQL
-- GroupVerify's tables, in CS2-SimpleAdmin's database. Applied once at load, tracked in
|
|
-- gv_migrations (like SimpleAdmin's sa_migrations, kept apart so neither confuses the other).
|
|
-- Times are wall-clock values in gv_settings' timezone, which should match SimpleAdmin's Timezone.
|
|
|
|
-- One row per player and source. A player counts as verified if they have a 'group' row, or a
|
|
-- row with `override` = 1 whose expires_at is NULL (never) or still ahead.
|
|
-- source 'group': written by the plugin when Steam's Web API says they're in the group (checked
|
|
-- as they join), `override` 0. Deleted when Steam says they aren't.
|
|
-- source 'manual': written by the web panel, `override` 1, expires_at NULL or a date.
|
|
-- updated_at is when Steam last confirmed a group row.
|
|
CREATE TABLE IF NOT EXISTS `gv_verified` (
|
|
`steamid64` bigint(20) NOT NULL,
|
|
`source` enum('group','manual') NOT NULL,
|
|
`override` tinyint(1) NOT NULL DEFAULT 0,
|
|
`expires_at` datetime NULL DEFAULT NULL,
|
|
`added_by` varchar(128) NOT NULL DEFAULT '',
|
|
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`steamid64`, `source`),
|
|
KEY `idx_gv_verified_override` (`override`, `expires_at`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
-- Plugin settings, name -> value. The plugin adds any missing name with its default at load, and
|
|
-- rereads them on every database reload, so edits apply without a restart.
|
|
CREATE TABLE IF NOT EXISTS `gv_settings` (
|
|
`name` varchar(64) NOT NULL,
|
|
`value` varchar(255) NOT NULL DEFAULT '',
|
|
PRIMARY KEY (`name`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|