Matchmaker & some improvements.

**Changes**

- Added the websocket for matchmaker into the server so you can use the matchmaker again. (more infos in the ReadMe file)
- Added some fixes into the cloudstorage to fix long waiting on nintendo switch & mobile when checking server connection.
- Added support for the F8 key to bring up the console.
- Removed a console.log in functions to clean up the log (no longer showing the season in log for no reason)
This commit is contained in:
Secret1337
2023-09-27 20:17:13 +02:00
committed by GitHub
parent 2ea81cbde5
commit f7457bc92d
7 changed files with 118 additions and 5 deletions

View File

@@ -3,17 +3,21 @@ const XMLBuilder = require("xmlbuilder");
const XMLParser = require("xml-parser");
const functions = require("./../structure/functions.js");
const matchmaker = require("./matchmaker.js");
const port = 80;
const wss = new WebSocket({ port: port }, () => console.log("XMPP started listening on port", port));
const wss = new WebSocket({ port: port }, () => console.log("XMPP and Matchmaker started listening on port", port));
wss.on("error", (err) => {
console.log("XMPP \x1b[31mFAILED\x1b[0m to start hosting (NOTE: This should not affect LawinServer).");
console.log("XMPP and Matchmaker \x1b[31mFAILED\x1b[0m to start hosting.");
})
global.Clients = [];
wss.on('connection', async (ws) => {
if (ws.protocol.toLowerCase() != "xmpp") return matchmaker(ws);
var accountId = "";
var jid = "";
var id = "";