Compare commits
5 Commits
2527a331a7
...
dff251d33d
| Author | SHA1 | Date | |
|---|---|---|---|
| dff251d33d | |||
| 7e64c4379e | |||
| f3f8a35107 | |||
| 39adc796d0 | |||
| 5ac9604504 |
+6
-5
@@ -3,11 +3,12 @@
|
|||||||
{ "room": "lobby2", "channel": "1159954805146529823", "uri": "wss://game.multiplayerpiano.com:443" },
|
{ "room": "lobby2", "channel": "1159954805146529823", "uri": "wss://game.multiplayerpiano.com:443" },
|
||||||
{ "room": "test/awkward", "channel": "1159954847542546513", "uri": "wss://game.multiplayerpiano.com:443" },
|
{ "room": "test/awkward", "channel": "1159954847542546513", "uri": "wss://game.multiplayerpiano.com:443" },
|
||||||
|
|
||||||
{ "room": "lobby", "channel": "339609383644168195", "uri": "wss://mppclone.com:8443" },
|
{ "room": "lobby", "channel": "339609383644168195", "uri": "wss://backend.multiplayerpiano.net" },
|
||||||
{ "room": "lobby2", "channel": "350006891948277770", "uri": "wss://mppclone.com:8443" },
|
{ "room": "lobby2", "channel": "350006891948277770", "uri": "wss://backend.multiplayerpiano.net" },
|
||||||
{ "room": "✧𝓓𝓔𝓥 𝓡𝓸𝓸𝓶✧", "channel": "698736467559710740", "uri": "wss://mppclone.com:8443" },
|
{ "room": "✧𝓓𝓔𝓥 𝓡𝓸𝓸𝓶✧", "channel": "698736467559710740", "uri": "wss://backend.multiplayerpiano.net" },
|
||||||
{ "room": "test/awkward", "channel": "360556775860076544", "uri": "wss://mppclone.com:8443" },
|
{ "room": "test/awkward", "channel": "360556775860076544", "uri": "wss://backend.multiplayerpiano.net" },
|
||||||
{ "room": "test/fishing", "channel": "339613702472859659", "uri": "wss://mppclone.com:8443" },
|
{ "room": "test/fishing", "channel": "339613702472859659", "uri": "wss://backend.multiplayerpiano.net" },
|
||||||
|
{ "room": "cheez", "channel": "1483714895496089670", "uri": "wss://backend.multiplayerpiano.net" },
|
||||||
|
|
||||||
{ "room": "lobby", "channel": "339904195719200768", "uri": "wss://piano.ourworldofpixels.com" }
|
{ "room": "lobby", "channel": "339904195719200768", "uri": "wss://piano.ourworldofpixels.com" }
|
||||||
]
|
]
|
||||||
|
|||||||
+1
-1
@@ -105,7 +105,7 @@ Client.prototype.connect = function() {
|
|||||||
} else {
|
} else {
|
||||||
++self.connectionAttempts;
|
++self.connectionAttempts;
|
||||||
}
|
}
|
||||||
var ms_lut = [50, 2950, 7000, 10000];
|
var ms_lut = [50, 2950, 7000, 10000, 30000, 60000];
|
||||||
var idx = self.connectionAttempts;
|
var idx = self.connectionAttempts;
|
||||||
if(idx >= ms_lut.length) idx = ms_lut.length - 1;
|
if(idx >= ms_lut.length) idx = ms_lut.length - 1;
|
||||||
var ms = ms_lut[idx];
|
var ms = ms_lut[idx];
|
||||||
|
|||||||
+3
-2
@@ -7,7 +7,7 @@ global.createMPPbridge = async function createMPPbridge({room, channel, uri}) {
|
|||||||
var d = new DiscordMessageSender(channel);
|
var d = new DiscordMessageSender(channel);
|
||||||
|
|
||||||
const gClient = new Client(uri);
|
const gClient = new Client(uri);
|
||||||
if (uri == "wss://mppclone.com:8443") gClient.token = config.mpc_token; //todo hmm
|
if (uri == "wss://backend.multiplayerpiano.net") gClient.token = config.mpc_token; //todo hmm
|
||||||
gClient.setChannel(room, {visible:false});
|
gClient.setChannel(room, {visible:false});
|
||||||
gClient.start();
|
gClient.start();
|
||||||
|
|
||||||
@@ -119,7 +119,8 @@ global.createMPPbridge = async function createMPPbridge({room, channel, uri}) {
|
|||||||
gClient.prependListener("p", async participant => {
|
gClient.prependListener("p", async participant => {
|
||||||
if (gClient.ppl[participant.id]) { // is update
|
if (gClient.ppl[participant.id]) { // is update
|
||||||
let oldName = gClient.ppl[participant.id].name, newName = participant.name;
|
let oldName = gClient.ppl[participant.id].name, newName = participant.name;
|
||||||
if (newName != oldName && channel.id != "698736467559710740")
|
let isBot = gClient.ppl[participant.id].tag?.text == "BOT";
|
||||||
|
if (newName != oldName && !isBot)
|
||||||
d.send(`\`${participant._id.substr(0,6)}\` ___**${sanitizeName(oldName)}** changed their name to **${sanitizeName(newName)}**___`);
|
d.send(`\`${participant._id.substr(0,6)}\` ___**${sanitizeName(oldName)}** changed their name to **${sanitizeName(newName)}**___`);
|
||||||
} else { // is join
|
} else { // is join
|
||||||
d.send(`\`${participant._id.substr(0,6)}\` ___**${sanitizeName(participant.name)}** entered the room.___`);
|
d.send(`\`${participant._id.substr(0,6)}\` ___**${sanitizeName(participant.name)}** entered the room.___`);
|
||||||
|
|||||||
Reference in New Issue
Block a user