mirror of
https://github.com/Lawin0129/LawinServer.git
synced 2026-01-13 02:42:22 +01:00
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:
@@ -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 = "";
|
||||
|
||||
Reference in New Issue
Block a user