Commit 96c55e12 authored by nanahira's avatar nanahira

fix

parent ed9e336c
Pipeline #43198 passed with stages
in 43 seconds
...@@ -16,8 +16,10 @@ export class ClientVersionCheck { ...@@ -16,8 +16,10 @@ export class ClientVersionCheck {
); );
constructor(private ctx: Context) { constructor(private ctx: Context) {
this.ctx.middleware(YGOProCtosJoinGame, async (msg, client, next) => { this.ctx.middleware(
if (msg.version === YGOPRO_VERSION) { YGOProCtosJoinGame,
async (msg, client, next) => {
if (msg.version === this.version) {
return next(); return next();
} }
if (this.altVersions.includes(msg.version)) { if (this.altVersions.includes(msg.version)) {
...@@ -28,10 +30,12 @@ export class ClientVersionCheck { ...@@ -28,10 +30,12 @@ export class ClientVersionCheck {
await client.send( await client.send(
new YGOProStocErrorMsg().fromPartial({ new YGOProStocErrorMsg().fromPartial({
msg: 4, msg: 4,
code: YGOPRO_VERSION, code: this.version,
}), }),
); );
return client.disconnect(); return client.disconnect();
}); },
true,
);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment