Compare commits

..

5 Commits

Author SHA1 Message Date
lamp dff251d33d ignore bot name change 2026-03-18 03:00:04 -04:00
lamp 7e64c4379e add cheez 2026-03-18 02:59:56 -04:00
lamp f3f8a35107 fucking bruh moment 2026-03-18 02:18:39 -04:00
lamp 39adc796d0 up max reconnect interval to 60s 2026-03-18 01:47:48 -04:00
lamp 5ac9604504 updated mppclone uri 2026-03-18 01:43:54 -04:00
3 changed files with 10 additions and 8 deletions
+6 -5
View File
@@ -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
View File
@@ -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
View File
@@ -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.___`);