AAAAA
This commit is contained in:
parent
90431b0fad
commit
4a5d4b8dd6
|
@ -117,7 +117,7 @@ Client.prototype.connect = function() {
|
||||||
});
|
});
|
||||||
this.ws.addEventListener("open", function(evt) {
|
this.ws.addEventListener("open", function(evt) {
|
||||||
self.connectionTime = Date.now();
|
self.connectionTime = Date.now();
|
||||||
self.sendArray([{m: "hi", x: 1, token: self.uri.includes("mppclone.com") ? config.mpc_token : undefined}]);
|
self.sendArray([{m: "hi", x: 1, token: self.token}]);
|
||||||
self.pingInterval = setInterval(function() {
|
self.pingInterval = setInterval(function() {
|
||||||
self.sendArray([{m: "t", e: Date.now()}]);
|
self.sendArray([{m: "t", e: Date.now()}]);
|
||||||
}, 20000);
|
}, 20000);
|
||||||
|
|
|
@ -45,6 +45,7 @@ global.createMPPbridge = function createMPPbridge(room, DiscordChannelID, site =
|
||||||
site == "YFLV" ? new Client("wss://mpp.yourfriend.lv/ws") :
|
site == "YFLV" ? new Client("wss://mpp.yourfriend.lv/ws") :
|
||||||
undefined;
|
undefined;
|
||||||
if (!gClient) return console.error(`Invalid site ${site}`);
|
if (!gClient) return console.error(`Invalid site ${site}`);
|
||||||
|
if (site == "MPP") gClient.token = config.mpp_token;
|
||||||
gClient.setChannel(/*(site == "MPP" && room == "lobby") ? "lolwutsecretlobbybackdoor" : */room, {visible:false});
|
gClient.setChannel(/*(site == "MPP" && room == "lobby") ? "lolwutsecretlobbybackdoor" : */room, {visible:false});
|
||||||
gClient.start();
|
gClient.start();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue