diff --git a/src/commands/alias.json b/src/commands/alias.json index 621a901..0957982 100644 --- a/src/commands/alias.json +++ b/src/commands/alias.json @@ -4,5 +4,6 @@ "t": "target", "acc": "account", "d": "debug", - "?": "help" + "?": "help", + "m": "maintenance" } \ No newline at end of file diff --git a/src/http/routes/query_gateway.ts b/src/http/routes/query_gateway.ts index 6a807ef..5318f7c 100644 --- a/src/http/routes/query_gateway.ts +++ b/src/http/routes/query_gateway.ts @@ -25,6 +25,15 @@ export default function handle(req: Request, res: Response) { dataObj.stopEndTime = Date.now() * 2; } + const url = new URL(`https://crepe.sr${req.originalUrl}`); + const query = new URLSearchParams(url.search); + const version = query.get("version"); + + if (version !== "OSGMWin0.70.0") { + dataObj.retcode = 2; + dataObj.msg = "Unknown StarRail version. Did you forget to update your client?\nSupport Discord: https://discord.gg/QYZxrcJkjH"; + } + let rsp; try { rsp = Gateserver.encode(dataObj).finish();