Switchbot gate: find the mt<date> mark anywhere in the client timestamp

Every locale.cfg client build is LOCALE_SERVICE_EUROPE and sends
CG_CLIENT_VERSION2, and 203 compares that timestamp with atoi against
1215955205. The client now sends "1215955205 mt20261016", so the gate
looks for "mt" instead of requiring it at the start. Found on channel5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-16 20:35:08 +09:00
co-authored by Claude Opus 5.5
parent a28393b16b
commit 972c200cd0
3 changed files with 10 additions and 7 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ Header numbers, subheaders and field order are AVA2's. The structs are `pack(1)`
CG is registered in `packet_info.cpp` with `Set(..., true)` and GG with `Set(..., false)`. The 40250 base packets are unchanged.
**Version gate.** The new client sends `mt20261016` as the `CG_CLIENT_VERSION` timestamp, in place of `__TIMESTAMP__`. Before `EnterGame` sends anything, it checks `SwitchbotHelper::IsClientSupported`, which requires `mt<date>` with date >= `PORT_SWITCHBOT_CLIENT_VERSION`. An older client gets no GC_SWITCHBOT packet. It can't fill the window either. The EU-branch client timestamp (`1215955205`) doesn't pass the gate.
**Version gate.** The client is built with `LOCALE_SERVICE_EUROPE`, so every locale sends `CG_CLIENT_VERSION2`. The new client's timestamp is `1215955205 mt20261016`. 203 is a europe locale and checks the version with `atoi`, which still reads 1215955205. Before `EnterGame` sends anything, it checks `SwitchbotHelper::IsClientSupported`, which looks for `mt<date>` in the timestamp with date >= `PORT_SWITCHBOT_CLIENT_VERSION`. An older client sends `1215955205` only and gets no GC_SWITCHBOT packet. It can't fill the window either. (The non-EU branch sends `mt20261016`.)
## Verification
@@ -60,4 +60,4 @@ CG is registered in `packet_info.cpp` with `Set(..., true)` and GG with `Set(...
- the version gate;
- that `/mt_switchbot` is gone.
- Client: `metin2-client/tests/wiki/test_switchbot.py` checks that the window script is AVA2 `uiswitchbot.py` verbatim, plus its glue.
- Not yet compiled on 203 and not deployed. The live 203 still runs v1, so the server and client must be deployed together.
- Compiled on 203 (dev tree) and run on channel5. Not deployed. The live 203 still runs v1, so the server and client must be deployed together.