Make protocol version a global variable

This commit is contained in:
Ethan Stubbs 2021-02-05 03:14:53 +00:00
parent 02cf151134
commit 1697c55d0d
2 changed files with 4 additions and 2 deletions

View file

@ -6,6 +6,8 @@ const app = require("express")(),
const debugMode = true;
global.protocolVersion = 19;
global.consoleHelper = require("./consoleHelper.js");
const serverHandler = require("./server/serverHandler.js");

View file

@ -86,8 +86,8 @@ module.exports = function(req, res, loginInfo) {
// The reply id is the user's id in any other case than an error in which case negative numbers are used
osuPacketWriter.LoginReply(NewUser.id);
// Current bancho protocol version is 19
osuPacketWriter.ProtocolNegotiation(19);
// Current bancho protocol version. Defined in Binato.js
osuPacketWriter.ProtocolNegotiation(global.protocolVersion);
// Permission level 4 is osu!supporter
osuPacketWriter.LoginPermissions(4);