Compare commits

..

7 Commits

Author SHA1 Message Date
lamp 0121a48063 :/ 2026-03-18 03:16:05 -04:00
lamp 525346ddcf change getOwnParticipant()._id to user._id 2026-03-18 03:10:12 -04:00
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 9 deletions
+5 -5
View File
@@ -3,11 +3,11 @@
{ "room": "lobby2", "channel": "1159954805146529823", "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": "lobby2", "channel": "350006891948277770", "uri": "wss://mppclone.com:8443" },
{ "room": "✧𝓓𝓔𝓥 𝓡𝓸𝓸𝓶✧", "channel": "698736467559710740", "uri": "wss://mppclone.com:8443" },
{ "room": "test/awkward", "channel": "360556775860076544", "uri": "wss://mppclone.com:8443" },
{ "room": "test/fishing", "channel": "339613702472859659", "uri": "wss://mppclone.com:8443" },
{ "room": "lobby", "channel": "339609383644168195", "uri": "wss://backend.multiplayerpiano.net" },
{ "room": "lobby2", "channel": "350006891948277770", "uri": "wss://backend.multiplayerpiano.net" },
{ "room": "✧𝓓𝓔𝓥 𝓡𝓸𝓸𝓶✧", "channel": "698736467559710740", "uri": "wss://backend.multiplayerpiano.net" },
{ "room": "test/awkward", "channel": "360556775860076544", "uri": "wss://backend.multiplayerpiano.net" },
{ "room": "test/fishing", "channel": "339613702472859659", "uri": "wss://backend.multiplayerpiano.net" },
{ "room": "lobby", "channel": "339904195719200768", "uri": "wss://piano.ourworldofpixels.com" }
]
+1 -1
View File
@@ -105,7 +105,7 @@ Client.prototype.connect = function() {
} else {
++self.connectionAttempts;
}
var ms_lut = [50, 2950, 7000, 10000];
var ms_lut = [50, 2950, 7000, 10000, 30000, 60000];
var idx = self.connectionAttempts;
if(idx >= ms_lut.length) idx = ms_lut.length - 1;
var ms = ms_lut[idx];
+4 -3
View File
@@ -7,7 +7,7 @@ global.createMPPbridge = async function createMPPbridge({room, channel, uri}) {
var d = new DiscordMessageSender(channel);
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.start();
@@ -78,7 +78,7 @@ global.createMPPbridge = async function createMPPbridge({room, channel, uri}) {
// MPP to Discord
gClient.on('a', async msg => {
if (msg.p._id == gClient.getOwnParticipant()._id) return;
if (msg.p._id == gClient.user._id) return;
var id = msg.p._id.substr(0,6);
var name = sanitizeName(msg.p.name);
var content = msg.a;
@@ -119,7 +119,8 @@ global.createMPPbridge = async function createMPPbridge({room, channel, uri}) {
gClient.prependListener("p", async participant => {
if (gClient.ppl[participant.id]) { // is update
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)}**___`);
} else { // is join
d.send(`\`${participant._id.substr(0,6)}\` ___**${sanitizeName(participant.name)}** entered the room.___`);