Verification: clan tag setting, GroupVerify 0.3.0 wording

Root sets GroupVerify's clan_tag (the scoreboard tag CS2-Tags gives verified players without a
rank) next to the Steam group. Validated like the plugin (12 UTF-16 units, no quotes, ; or \),
saved to gv_settings and sent as css_gv_clantag when the plugin is loaded. Only changed fields
are sent.

GroupVerify 0.3.0 checks players with the Steam Web API as they join, so the group list is now
"Confirmed group members" with first/last confirmed dates.
This commit is contained in:
Astra 2026-10-02 18:44:44 +01:00
parent 9e4bc63201
commit 3c62874f91
6 changed files with 102 additions and 17 deletions

View file

@ -19,6 +19,7 @@ type VerifySettings struct {
GroupID string // "" when no group is set
ReloadSeconds int // how often GroupVerify rereads its tables
Location *time.Location
ClanTag string // scoreboard tag for verified players without a rank, "" for none
}
// Active matches GroupVerify: it only verifies anyone when enabled with a group set.
@ -57,6 +58,8 @@ func (s *Store) VerifySettings(ctx context.Context) (VerifySettings, error) {
if n, err := strconv.Atoi(value); err == nil && n >= 10 {
v.ReloadSeconds = n
}
case "clan_tag":
v.ClanTag = value
case "timezone":
if loc, err := time.LoadLocation(value); err == nil {
v.Location = loc
@ -150,7 +153,7 @@ func (s *Store) VerifyStatuses(ctx context.Context, loc *time.Location, steamids
// What VerifyList lists.
const (
VerifyOverrides = "overrides" // unexpired rows with override = 1
VerifyGroup = "group" // the Steam group's members, as of GroupVerify's last fetch
VerifyGroup = "group" // players Steam confirmed are in the group as they joined
)
// VerifyList lists overrides or group members, newest first. Search matches a SteamID64 or a name
@ -207,8 +210,8 @@ func (s *Store) VerifyList(ctx context.Context, loc *time.Location, kind, search
return out, total, rows.Err()
}
// VerifyCounts is how many group members and unexpired overrides there are, and when GroupVerify
// last saved the group's member list (nil if it never has).
// VerifyCounts is how many confirmed group members and unexpired overrides there are, and when
// Steam last confirmed a member (nil if it never has).
func (s *Store) VerifyCounts(ctx context.Context, loc *time.Location) (group, overrides int, fetched *time.Time, err error) {
var last sql.NullTime
err = s.db.QueryRowContext(ctx, `SELECT