Skip to content

feat!: rename the plugin to Auto Tournament CS2 (2.0.0) - #32

Merged
sivert-io merged 2 commits into
devfrom
rename/auto-tournament-cs2-2.0.0
Sep 24, 2026
Merged

sivert-io merged 2 commits into
devfrom
rename/auto-tournament-cs2-2.0.0

Conversation

@sivert-io

Copy link
Copy Markdown
Collaborator

Renames the plugin from MatchZy to Auto Tournament CS2, outright, as 2.0.0, following brand/RENAME-3.0.md. No aliases and no fallback: old matchzy_* lines in a config file are not read. Existing installs are carried over once, on the first start of 2.0.0.

Not released. The version is set to 2.0.0 in src/AutoTournamentCS2.cs (where release.sh reads it). Release order per the rename doc: this plugin release, then csm, then platform 3.0.

What changed

What Old New
Console variables and commands matchzy_* at_* (full list below)
Root compat command matchzy match load <url> at match load <url>
Plugin file / folder plugins/MatchZy/MatchZy.dll plugins/AutoTournamentCS2/AutoTournamentCS2.dll
Config folder cfg/MatchZy/ cfg/AutoTournamentCS2/
Chat tag (and console log tag) [MatchZy] [Auto Tournament]
SQLite file matchzy.db auto_tournament_cs2.db
Tables (SQLite and MySQL) matchzy_stats_matches, matchzy_stats_maps, matchzy_stats_players, matchzy_server_config, matchzy_event_queue at_*
Auth header X-MatchZy-Token X-Auto-Tournament-Token
Release asset MatchZy-<version>.zip AutoTournamentCS2-<version>.zip
C# namespace, plugin class, types MatchZy, MatchZy*Event, ... AutoTournamentCS2, AutoTournamentCS2*Event, ...
Test project tests/MatchZy.Tests tests/AutoTournamentCS2.Tests
ModuleName MatchZy Auto Tournament CS2

Not in the name table (derived the same way; please add them to it)

  • Demo and backup upload headers: MatchZy-FileName, MatchZy-MatchId, MatchZy-MapNumber, MatchZy-RoundNumber → Auto-Tournament-FileName, Auto-Tournament-MatchId, Auto-Tournament-MapNumber, Auto-Tournament-RoundNumber. The Get5-* copies are still sent. Platform 2.x reads Get5-* as a fallback, so demo uploads keep working. Platform 3.0 has to read the auto-tournament-* names (api/src/integrations/cs2/routes/demos.ts) or keep relying on Get5-*.
  • Update log markers: [MATCHZY_UPDATE_AVAILABLE] and [MATCHZY_UPDATE_SHUTDOWN] → [AT_UPDATE_AVAILABLE] and [AT_UPDATE_SHUTDOWN]. csm greps for the old marker (src/internal/csm/monitor.go).
  • Start argument: +matchzy_config_scope → +at_config_scope. csm passes this (matchzy_scope.go, launch_cmd.go), and csm doctor looks for the string matchzy_config_scope inside MatchZy.dll.
  • Version commands: css_matchzy_version → css_at_version, and the chat command .matchzyversion → .atversion. .version and css_version are unchanged.
  • Files and folders on the server: csgo/MatchZyDataBackup/ → csgo/AutoTournamentCS2DataBackup/, csgo/MatchZy_Stats/ → csgo/AutoTournamentCS2_Stats/, csgo/MatchZyPlayerNames/ → csgo/AutoTournamentCS2PlayerNames/, the default demo folder csgo/MatchZy/ → csgo/AutoTournamentCS2/, round backups matchzy_<match>_<map>_round<n>.json → at_<match>_<map>_round<n>.json, matchzy_breadcrumbs.log → at_breadcrumbs.log. These are not carried over (see below).
  • Translation keys: matchzy.* → at.* in every lang/*.json file. They are internal. Translated text that said "MatchZy" now says "Auto Tournament CS2".
  • Test/env names: MATCHZY_BOOTSTRAP_TOKEN in a redaction test → AT_BOOTSTRAP_TOKEN.
  • In-game credit message (at_show_credits_on_match_start) used to say "MatchZy Plugin by WD-". It now prints the credit line: "Auto Tournament CS2 is forked from MatchZy by shobhit-pathak."

Every renamed console variable and command

121 matchzy_* names, plus the root command matchzy → at, css_matchzy_version → css_at_version and the chat command .matchzyversion → .atversion: 124 in total. (platform) marks the 54 names the platform sets or reads over RCON today (found by grepping api/src in auto-tournament). The platform has to switch those to the at_* names.

Full list (121)
  • matchzy_addplayer → at_addplayer (platform)
  • matchzy_admin_chat_prefix → at_admin_chat_prefix (platform)
  • matchzy_admins_refresh_seconds → at_admins_refresh_seconds
  • matchzy_admins_url → at_admins_url
  • matchzy_allow_force_ready → at_allow_force_ready (platform)
  • matchzy_autoready_check_delay → at_autoready_check_delay
  • matchzy_autoready_enabled → at_autoready_enabled (platform)
  • matchzy_autoready_ready_delay → at_autoready_ready_delay
  • matchzy_autoready_simulation_allow_start_without_humans → at_autoready_simulation_allow_start_without_humans
  • matchzy_autoready_simulation_bot_spawn_delay → at_autoready_simulation_bot_spawn_delay
  • matchzy_autoready_simulation_enabled → at_autoready_simulation_enabled
  • matchzy_autoready_simulation_knife_start_command_delay → at_autoready_simulation_knife_start_command_delay
  • matchzy_autoready_simulation_knife_start_max_steps → at_autoready_simulation_knife_start_max_steps
  • matchzy_autoready_simulation_knife_start_mode → at_autoready_simulation_knife_start_mode
  • matchzy_autoready_simulation_knife_step_start_index → at_autoready_simulation_knife_step_start_index
  • matchzy_autoready_simulation_knife_use_safe_mode → at_autoready_simulation_knife_use_safe_mode
  • matchzy_autoready_simulation_skip_async_events → at_autoready_simulation_skip_async_events
  • matchzy_autoready_start_delay → at_autoready_start_delay
  • matchzy_autostart_mode → at_autostart_mode (platform)
  • matchzy_bootstrap_token → at_bootstrap_token (platform)
  • matchzy_bootstrap_url → at_bootstrap_url (platform)
  • matchzy_both_teams_unpause_required → at_both_teams_unpause_required (platform)
  • matchzy_center_html_notifications → at_center_html_notifications
  • matchzy_chat_messages_timer_delay → at_chat_messages_timer_delay
  • matchzy_chat_prefix → at_chat_prefix (platform)
  • matchzy_check_for_updates → at_check_for_updates
  • matchzy_clear_event_queue → at_clear_event_queue (platform)
  • matchzy_clear_queued_match → at_clear_queued_match (platform)
  • matchzy_config_scope → at_config_scope
  • matchzy_crash_debug_breadcrumbs → at_crash_debug_breadcrumbs
  • matchzy_debug_chat → at_debug_chat (platform)
  • matchzy_debug_chat_get → at_debug_chat_get
  • matchzy_debug_console → at_debug_console
  • matchzy_demo_name_format → at_demo_name_format (platform)
  • matchzy_demo_path → at_demo_path (platform)
  • matchzy_demo_recording_enabled → at_demo_recording_enabled (platform)
  • matchzy_demo_upload_header_key → at_demo_upload_header_key (platform)
  • matchzy_demo_upload_header_value → at_demo_upload_header_value (platform)
  • matchzy_demo_upload_url → at_demo_upload_url (platform)
  • matchzy_enable_damage_report → at_enable_damage_report
  • matchzy_enable_tech_pause → at_enable_tech_pause
  • matchzy_event_cleanup_interval → at_event_cleanup_interval
  • matchzy_event_retry_interval → at_event_retry_interval
  • matchzy_events_enabled → at_events_enabled
  • matchzy_everyone_is_admin → at_everyone_is_admin
  • matchzy_ffw_check_interval → at_ffw_check_interval
  • matchzy_ffw_enabled → at_ffw_enabled (platform)
  • matchzy_ffw_time → at_ffw_time (platform)
  • matchzy_get_match_stats → at_get_match_stats
  • matchzy_get_pending_events → at_get_pending_events
  • matchzy_gg_enabled → at_gg_enabled (platform)
  • matchzy_gg_min_score_diff → at_gg_min_score_diff (platform)
  • matchzy_gg_threshold → at_gg_threshold (platform)
  • matchzy_heartbeat_url → at_heartbeat_url
  • matchzy_hostname_format → at_hostname_format (platform)
  • matchzy_kick_when_no_match_loaded → at_kick_when_no_match_loaded (platform)
  • matchzy_knife_enabled_default → at_knife_enabled_default (platform)
  • matchzy_listbackups → at_listbackups
  • matchzy_loadbackup → at_loadbackup
  • matchzy_loadbackup_url → at_loadbackup_url
  • matchzy_loadmatch → at_loadmatch
  • matchzy_loadmatch_url → at_loadmatch_url (platform)
  • matchzy_match_report → at_match_report (platform)
  • matchzy_match_start_message → at_match_start_message
  • matchzy_match_token → at_match_token
  • matchzy_max_pauses_per_team → at_max_pauses_per_team (platform)
  • matchzy_max_saved_last_grenades → at_max_saved_last_grenades
  • matchzy_max_tech_pauses_allowed → at_max_tech_pauses_allowed
  • matchzy_minimum_ready_required → at_minimum_ready_required (platform)
  • matchzy_notification_duration_global → at_notification_duration_global
  • matchzy_notification_duration_player → at_notification_duration_player
  • matchzy_pause_after_restore → at_pause_after_restore (platform)
  • matchzy_pause_duration → at_pause_duration (platform)
  • matchzy_playout_enabled_default → at_playout_enabled_default (platform)
  • matchzy_reload_config → at_reload_config
  • matchzy_remote_backup_header_key → at_remote_backup_header_key
  • matchzy_remote_backup_header_value → at_remote_backup_header_value
  • matchzy_remote_backup_url → at_remote_backup_url
  • matchzy_remote_log_header_key → at_remote_log_header_key (platform)
  • matchzy_remote_log_header_value → at_remote_log_header_value (platform)
  • matchzy_remote_log_url → at_remote_log_url (platform)
  • matchzy_removeplayer → at_removeplayer
  • matchzy_report_endpoint → at_report_endpoint (platform)
  • matchzy_report_server_id → at_report_server_id (platform)
  • matchzy_report_token → at_report_token (platform)
  • matchzy_reset_cvars_on_series_end → at_reset_cvars_on_series_end (platform)
  • matchzy_safeautoupdater_action → at_safeautoupdater_action
  • matchzy_safeautoupdater_enabled → at_safeautoupdater_enabled
  • matchzy_safeautoupdater_offline_backoff_seconds → at_safeautoupdater_offline_backoff_seconds
  • matchzy_save_nades_as_global_enabled → at_save_nades_as_global_enabled
  • matchzy_series_end_kick_delay_demo_no_upload → at_series_end_kick_delay_demo_no_upload (platform)
  • matchzy_series_end_kick_delay_demo_upload → at_series_end_kick_delay_demo_upload (platform)
  • matchzy_series_end_kick_delay_no_demo → at_series_end_kick_delay_no_demo (platform)
  • matchzy_server_id → at_server_id (platform)
  • matchzy_show_credits_on_match_start → at_show_credits_on_match_start
  • matchzy_side_selection_enabled → at_side_selection_enabled (platform)
  • matchzy_side_selection_reminder_interval → at_side_selection_reminder_interval
  • matchzy_side_selection_time → at_side_selection_time (platform)
  • matchzy_smoke_color_enabled → at_smoke_color_enabled
  • matchzy_stop_command_available → at_stop_command_available (platform)
  • matchzy_stop_command_no_damage → at_stop_command_no_damage (platform)
  • matchzy_tech_pause_duration → at_tech_pause_duration
  • matchzy_tech_pause_flag → at_tech_pause_flag
  • matchzy_tournament_go_live_status → at_tournament_go_live_status
  • matchzy_tournament_match → at_tournament_match (platform)
  • matchzy_tournament_next_match → at_tournament_next_match (platform)
  • matchzy_tournament_status → at_tournament_status (platform)
  • matchzy_tournament_updated → at_tournament_updated (platform)
  • matchzy_use_pause_command_for_tactical_pause → at_use_pause_command_for_tactical_pause (platform)
  • matchzy_version → at_version
  • matchzy_warmup_buy_anywhere → at_warmup_buy_anywhere
  • matchzy_warmup_enable → at_warmup_enable
  • matchzy_warmup_ignore_win_conditions → at_warmup_ignore_win_conditions
  • matchzy_warmup_infinite_ammo → at_warmup_infinite_ammo
  • matchzy_warmup_maxmoney → at_warmup_maxmoney
  • matchzy_warmup_message_html → at_warmup_message_html
  • matchzy_warmup_respawn → at_warmup_respawn
  • matchzy_warmup_roundtime_minutes → at_warmup_roundtime_minutes
  • matchzy_warmup_startmoney → at_warmup_startmoney
  • matchzy_webhook_url → at_webhook_url
  • matchzy_whitelist_enabled_default → at_whitelist_enabled_default (platform)

The persisted settings in at_server_config use these same names as keys (at_server_id, at_bootstrap_url, at_bootstrap_token, at_remote_log_*, at_webhook_url, at_heartbeat_url, at_report_*, at_match_token, at_demo_upload_url, at_admins_*, at_chat_prefix, at_admin_chat_prefix, at_warmup_*).

Where the plugin sends the auth header

Always X-Auto-Tournament-Token now:

  • src/BootstrapConfig.cs: the bootstrap fetch (at_bootstrap_url with at_bootstrap_token).
  • src/MatHeartbeat.cs: the heartbeat POST.
  • src/MatchReportCommand.cs: the match report upload.
  • src/ReadyUpCompatCommands.cs: at_match_token sets at_remote_log_header_key "X-Auto-Tournament-Token", so events go out with it.

The platform picks the header name for these by setting it over RCON, so the platform has to send X-Auto-Tournament-Token in:

  • events: at_remote_log_header_key (PublishEvents.cs)
  • demo uploads: at_demo_upload_header_key (Utility.cs UploadFileAsync)
  • at_loadmatch_url / at_remote_backup_*: header name and value passed with the command

Today the platform sets matchzy_remote_log_header_key "X-MatchZy-Token" and matchzy_demo_upload_header_key "X-MatchZy-Token" (api/src/integrations/cs2/utils/matchzyRconCommands.ts, services/matchLoadingService.ts).

First-start carry-over

New src/LegacyCarryOver.cs, with no CounterStrikeSharp dependency, so it is unit tested. It runs on every start and does nothing once the old names are gone. It only moves or renames. It never overwrites a new-named file, table or setting, and never deletes anything. When both an old and a new name exist, both are left alone, a warning is logged, and the new one is used. Every step is logged with a [CarryOver] prefix, straight to the console (not gated by at_debug_console).

  1. Config folder, first thing in Load(), before admins.json or database.json is read:
    • cfg/MatchZy/ exists and cfg/AutoTournamentCS2/ doesn't: the folder is moved. Logs Moved cfg/MatchZy/ to cfg/AutoTournamentCS2/ (N file(s))., then one moved cfg/MatchZy/<file> -> cfg/AutoTournamentCS2/<file> line per file.
    • Both exist: each file the new folder doesn't have is moved (Moved cfg/MatchZy/<file> -> cfg/AutoTournamentCS2/<file>). Files in both are left in both places, and one WARNING: both cfg/MatchZy/ and cfg/AutoTournamentCS2/ have <files>. Using the files in cfg/AutoTournamentCS2/ ... lists them.
  2. SQLite file, also in Load(): matchzy.db is looked for in the new plugin folder (if an operator copied it) and then in plugins/MatchZy/, where every 1.x install kept it. It is renamed to plugins/AutoTournamentCS2/auto_tournament_cs2.db together with any -wal/-shm/-journal sidecar. Logs Renamed SQLite database <old> -> <new>. If auto_tournament_cs2.db already exists: warning, nothing moved.
  3. Tables, when the database opens and before CREATE TABLE IF NOT EXISTS could make empty new ones: each matchzy_<t> whose at_<t> does not exist is renamed. On MySQL that is one RENAME TABLE a TO b, c TO d, ... statement (atomic). On SQLite it is one transaction of ALTER TABLE ... RENAME TO. Logs Renamed table matchzy_<t> -> at_<t> for each. Foreign keys follow the rename on both. If the rename fails, it re-checks: when old tables are still waiting (for example, missing privileges), database init stops rather than create empty at_* tables next to them. When another server on the same database already renamed them, it carries on.
  4. Saved settings, after the config table has its current schema: rows in at_server_config keyed matchzy_<x> are re-keyed to at_<x>, per server scope, unless that server already has an at_<x> row. Logs Renamed saved setting matchzy_<x> -> at_<x> for server '<scope>'. Without this, the server id, bootstrap URL and token and remote log settings would be lost on upgrade.

Deviation from the brief, on purpose. The brief says to move cfg/MatchZy/ only when cfg/AutoTournamentCS2/ doesn't exist. But the release zip ships cfg/AutoTournamentCS2/, and csm and manual installs extract it before the first start. So that condition never fires in practice, and nothing would carry over. Hence the per-file move above, which keeps the never-overwrite and never-delete rules. For the same reason the zip no longer includes database.json: the plugin already writes a default when it's missing, and a shipped SQLite default would otherwise win over an operator's MySQL database.json and hide their match history.

Not carried over (outputs, not settings): demo files, round backups, MatchZy_Stats CSVs and the forced-names folder. They stay where they are.

Also not renamed: on a migrated MySQL database the foreign key constraint matchzy_stats_maps_matchid on at_stats_maps keeps its name. MySQL can only rename a foreign key by dropping and re-adding it, which isn't worth the risk. New installs get at_stats_maps_matchid.

For csm (release step 2)

  • Select the AutoTournamentCS2*.zip asset from Auto-Tournament/cs2-plugin, and install to plugins/AutoTournamentCS2/.
  • Remove the old plugins/MatchZy/MatchZy.dll so two copies never load, but don't delete plugins/MatchZy/matchzy.db before 2.0.0 has started once, because the plugin moves it from there. Alternatively, csm moves it to plugins/AutoTournamentCS2/auto_tournament_cs2.db itself.
  • Pass +at_config_scope. Watch for [AT_UPDATE_AVAILABLE]. Write overrides to cfg/AutoTournamentCS2/database.json. Point doctor at AutoTournamentCS2.dll and the at_config_scope string.
  • The zip now has addons/ and cfg/ at its root (it used to wrap them in a MatchZy-<version>/ folder). csm's extractor finds addons/counterstrikesharp either way.

Release workflow

release.yml still runs release.sh, which now:

  • builds AutoTournamentCS2-<version>.zip with addons/counterstrikesharp/plugins/AutoTournamentCS2/AutoTournamentCS2.dll and cfg/AutoTournamentCS2/ at the root
  • leaves out database.json
  • fails before committing or publishing anything if either of those two paths is missing from the zip (unzip added to the workflow's apt line)

discord-webhook.sh now links to Auto-Tournament/cs2-plugin and uses the new name. I ran the packaging part of release.sh locally in a .NET 8 container and checked the zip listing. Nothing was released.

Verification

  • dotnet isn't installed on this machine, so I ran everything in mcr.microsoft.com/dotnet/sdk:8.0. dotnet build -c Release: 0 errors. dotnet test tests/AutoTournamentCS2.Tests: 283 passed, including 9 new carry-over tests. They run on real temp folders and a real SQLite database and cover: folder move, per-file merge without overwrite, SQLite file from plugins/MatchZy/, no overwrite of an existing .db, table rename with data and foreign keys, both-tables-exist, settings re-keyed and readable, and no overwrite of a newer setting.
  • Ran the MySQL path against a real MySQL 8.4 container with a 1.x schema (unscoped config table, FKs, data). All 5 tables were renamed in one statement, data and FKs were intact, the scope migration and settings re-key followed, a second run did nothing, and a recreated old table gave the both-exist warning.
  • The /proc/self/cmdline fixtures in ServerIdentityTests were re-encoded with +at_config_scope.
  • CI: build.yml runs restore, build and test on every pull request. Its test path is updated.

Remaining matchzy hits (case-insensitive) and why they stay

  • README.md, Credits: the credit line "Auto Tournament CS2 is forked from MatchZy by shobhit-pathak."
  • src/Utility.cs:2154: the same credit line, printed in game on match start (at_show_credits_on_match_start).
  • LICENSE: the upstream copyright notice ("Shobhit Pathak"). It doesn't contain the word MatchZy, and it's unchanged.
  • README.md, Upgrading from 1.x (7 lines): tells operators which old names to rename and what the first start does with cfg/MatchZy/, plugins/MatchZy/, matchzy.db and the matchzy_* tables and settings. The upgrade guide needs the same.
  • src/LegacyCarryOver.cs: the old names (MatchZy, matchzy.db, matchzy_) as constants plus their doc comments. This is the code that finds them on disk and in the database.
  • tests/AutoTournamentCS2.Tests/LegacyCarryOverTests.cs: builds a 1.x-shaped install and database to test the carry-over.

🤖 Generated with Claude Code

sivert-io and others added 2 commits September 24, 2026 17:12
MatchZy becomes Auto Tournament CS2, outright, with no aliases:
matchzy_* console variables and commands are at_*, the plugin is
AutoTournamentCS2.dll in plugins/AutoTournamentCS2/, config lives in
cfg/AutoTournamentCS2/, the chat tag is [Auto Tournament], the SQLite
file is auto_tournament_cs2.db, tables are at_*, and the plugin
authenticates with X-Auto-Tournament-Token. The C# namespace and types
are renamed too. MatchZy remains only in the credit line and the
upstream licence notice.

On first start, LegacyCarryOver moves cfg/MatchZy/, renames matchzy.db
and the matchzy_* tables (one RENAME TABLE on MySQL), and re-keys saved
settings, never overwriting or deleting and logging every step.

The release asset is AutoTournamentCS2-<version>.zip with addons/ and
cfg/ at its root and without database.json. Version 2.0.0.

BREAKING CHANGE: old matchzy_* names are not read; platform 3.0 and csm
must use the at_* names, the new header and the new asset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…0.0)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sivert-io
sivert-io merged commit 78a9553 into dev Sep 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant