BREAKING: Version checking
This commit is contained in:
parent
01e60ab390
commit
b298649e30
@ -4,5 +4,6 @@
|
||||
"t": "target",
|
||||
"acc": "account",
|
||||
"d": "debug",
|
||||
"?": "help"
|
||||
"?": "help",
|
||||
"m": "maintenance"
|
||||
}
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user