From 1849d86a63f7a199f938737017d3982e91a88830 Mon Sep 17 00:00:00 2001 From: Hri7566 Date: Mon, 29 Jul 2024 02:44:29 -0400 Subject: [PATCH] stuff --- bun.lockb | Bin 0 -> 26268 bytes package-lock.json | 149 ---------------------------------------------- package.json | 15 ++--- server.js | 85 +++++++++++++++----------- stats.json | 2 +- 5 files changed, 56 insertions(+), 195 deletions(-) create mode 100755 bun.lockb delete mode 100644 package-lock.json diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..07ab6c263c5b2591025495f4f5e2b36b1585136f GIT binary patch literal 26268 zcmeHwc|4U%{Qse&P$(@_ltQH(JK<(6k&-O!CELLf$LXAdv??uhwQnS?qEx7ew8vG7 z7U{OpB1uuva+6Bm&*yPQPxr=A-|rv4-|N-%n&z1^^M21~KJ%G*W}fHilllPNPyt`p zo5R&*bHmiUL%FgLSwSH_v;8sf!;}f-tH%VMzZgjTGfGM~W^OzG1%JA;RXIJcAJ#E@-}H z&*kyi0s$jYg2Ctxzso_|8PZrtyFt1D(yowlAw`_0D0PEW4)XSpc7e1O=n!`mQW;2j zUVH&NlpiEubA7R;KScE;A;o%Z=rV^d5PlHh(xjSs1VS%isDLfta0A$Uj!@vs=23WG zwm`@aiD3AFv;lzeWqXJELmDjVM=&Rt4Os?T=!HMG{H`l%H<`~7oaG(j8{r)xWMdP;2p*fo5ikOv64t}^SiatjnUF#J9FZI@kU{(@ zNKs$ukfNRfyaXZPTn57h3Nh~wDdIdJMSUeh2Gc}QS_PGGJf;JQGNh%DSA^6*q*)*K z@Oux)-v-%Go-&1I{7q3B%oYZO_zDaaH%BL=U-?LzvT~Qk0|V~sdJOg$ z@NE3OutqNL%+Q2W!?G)^ztNfu+f$}NyfxhQ zSMwvD7=JpaxbiR0ki<1n45P<=E*B(a=HJS?z1G1`eZ}pU3QHtU`uFy^B5`6U`8{yD z?zGc4nHp=R*2K>p!b<4t`F8!X>AfaQdi=`h@MxXQ+Lv$D9=_h)t}xv)*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R-4-DLPlzwN59RSg=0>o*e0}-ojFUy(CBXxzj~963 z3=jqfAwP@F=ZEkGAzbh%%H;?G*uDZUKQ`-|NCH+coA1x|3E_gTOCbwyCQ#EWD8P&B z8w6l4u0LBuEnxG**etx|a(uj?B!cA^1p z3E-IzI4|Y1sn%FXZG+h7- zEytpc6=Kl;=?ZZC=Qpq!SZT#D{aZ;?m(UmKH@#6jCSrKLS3P#=yRo3`momvVH2nQw z0>}41fL`@=hKrHoJL>?7@A4o8{%Ly_(QS?D$2ZeMJf8jACZNp&z|(S+A`Qi%$s9v0 zxu%c?VvuC73P5rRI79f;w!C-_qdLmD7RWo}~s#tc8i3DFc?A zA}ATe;m8pRaO9H0iCb&%mA+>d;#1U%m|U|@J^L>fyAHR|-FHbTu1Z=`(D9-|H2(5nG0Jqxyl zYgpUkNshOGC6|E1J9pbS>gb93K=QF8QAv$6MMsx-G!{@6A3ugOryr_K>pR#hS zA!wu5-zov!w+z)|LviLn)%W!#NMCOd1W%@7bhOXmO%w% z%QYayTV0D?0J7zpYLnW10+}zKRN!#J58<)-!U)*wvRV`q#OC@71KKc`AJm41e()|DUa$rnFM_XX|mZ2sKHT>{jf`ohVePJcz;Q<)_i9#D1Z>a-h zE!Q9iJjW0tM@ut+Y`KO-vpq{L^?ytNPW0Z6>bJNt6utcel;{dj@bV9(mr1>e% I|9gM`4_XW?SpWb4 literal 0 HcmV?d00001 diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 7ab69d7..0000000 --- a/package-lock.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "name": "hello-express", - "version": "0.0.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "agent-base": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", - "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", - "requires": { - "es6-promisify": "^5.0.0" - } - }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" - }, - "es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "requires": { - "es6-promise": "^4.0.3" - } - }, - "express": { - "version": "4.17.1", - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - } - }, - "https-proxy-agent": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", - "requires": { - "agent-base": "^4.3.0", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, - "mpp-client-xt": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mpp-client-xt/-/mpp-client-xt-1.2.0.tgz", - "integrity": "sha512-r9xqbfX3kibfVXR2f5FYdEkeX5Ouh/UVGgEag9ofUMJQehK9oMpmc9aP4ZBH4W2Xh8fMqRb6EooEB4Pr/6ErAQ==", - "requires": { - "https-proxy-agent": "^2.2.1", - "socks-proxy-agent": "^4.0.1", - "ws": "^5.1.1" - } - }, - "smart-buffer": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", - "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==" - }, - "socks": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz", - "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", - "requires": { - "ip": "1.1.5", - "smart-buffer": "^4.1.0" - } - }, - "socks-proxy-agent": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz", - "integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==", - "requires": { - "agent-base": "~4.2.1", - "socks": "~2.3.2" - }, - "dependencies": { - "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", - "requires": { - "es6-promisify": "^5.0.0" - } - } - } - }, - "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", - "requires": { - "async-limiter": "~1.0.0" - } - } - } -} diff --git a/package.json b/package.json index 3b03674..24aac83 100644 --- a/package.json +++ b/package.json @@ -1,24 +1,19 @@ { - "//1": "describes your app and its dependencies", - "//2": "https://docs.npmjs.com/files/package.json", - "//3": "updating this file will download and update your packages", - "name": "hello-express", - "version": "0.0.1", + "name": "dvdbot", + "version": "1.0.0", "description": "A simple Node app built on Express, instantly up and running.", "main": "server.js", "scripts": { "start": "node server.js" }, "dependencies": { - "express": "^4.17.1", - "mpp-client-xt": "^1.2.0" + "dotenv": "^16.4.5", + "express": "^4.19.2", + "mpp-client-net": "^1.2.1" }, "engines": { "node": "12.x" }, - "repository": { - "url": "https://glitch.com/edit/#!/hello-express" - }, "license": "MIT", "keywords": [ "node", diff --git a/server.js b/server.js index 8ec740e..a47d7cc 100644 --- a/server.js +++ b/server.js @@ -1,31 +1,38 @@ -const MPPClient = require('mpp-client-xt'); -const client = new MPPClient("wss://mpp.hri7566.info:8443", undefined); -const fs = require('fs'); +import { Client } from "mpp-client-net/src/index"; +import { configDotenv } from "dotenv"; +import fs from "fs"; + +console.log(Client); + +configDotenv(); + +const client = new Client("wss://mppclone.com:8443", process.env.MPPNET_TOKEN); client.start(); client.on("hi", () => { - setTimeout(function() { - client.sendArray([{m:'userset', set:{name:"hri's dvdbot [dvd!help]"}}]); - }) - - client.setChannel("lobby"); + setTimeout(function () { + client.sendArray([ + { m: "userset", set: { name: "hri's dvdbot [dvd!help]" } }, + ]); + }); + + client.setChannel("test/awkward"); }); function chat(string) { - client.sendArray([{m:'a', message:string}]); + client.sendArray([{ m: "a", message: string }]); } var ctoggle = true; var cursormode = "dvd"; - client.on("a", (msg) => { - let args = msg.a.split(' '); + let args = msg.a.split(" "); let cmd = args[0].toLowerCase(); let argcat = msg.a.substring(cmd.length).trim(); - + switch (cmd) { case "dvd!help": chat("cmds: dvd!help // dvd!cursor // dvd!stats // dvd!about"); @@ -37,14 +44,14 @@ client.on("a", (msg) => { switch (argcat) { case "on": ctoggle = true; - pos = {x: (Math.random() * 100) - 50, y: (Math.random() * 100) - 50}; - vel = {x: 2/5, y: 2/7}; + pos = { x: Math.random() * 100 - 50, y: Math.random() * 100 - 50 }; + vel = { x: 2 / 5, y: 2 / 7 }; cursormode = "dvd"; break; case "off": ctoggle = false; cursormode = "none"; - pos = {x: -500, y: -500}; + pos = { x: -500, y: -500 }; break; default: chat("invalid :P"); @@ -53,54 +60,62 @@ client.on("a", (msg) => { } break; case "dvd!stats": - chat("Edge hits: " + stats.edgehits + " | Corner hits: " + stats.cornerhits); + chat( + "Edge hits: " + stats.edgehits + " | Corner hits: " + stats.cornerhits, + ); break; case "dvd!about": - chat("Made by Hri7566 in his free time :)"); + chat("this bot is ancient dude"); break; } }); -var pos = {x: (Math.random() * 100) - 50, y: (Math.random() * 100) - 50}; -var vel = {x: 2/5, y: 2/7}; -var statsraw = fs.readFileSync('stats.json'); +var pos = { x: Math.random() * 100 - 50, y: Math.random() * 100 - 50 }; +var vel = { x: 2 / 5, y: 2 / 7 }; +var statsraw = fs.readFileSync("stats.json"); var stats = JSON.parse(statsraw); console.log(stats); -var cursor = setInterval(function() { - client.sendArray([{m:'m', x: client.getOwnParticipant().x = pos.x + 50, y: client.getOwnParticipant().y = pos.y + 50}]); -}, 16); +var cursor = setInterval(function () { + client.sendArray([ + { + m: "m", + x: (client.getOwnParticipant().x = pos.x + 50), + y: (client.getOwnParticipant().y = pos.y + 50), + }, + ]); +}, 1000 / 20); -var cursorupdate = setInterval(function() { +var cursorupdate = setInterval(function () { switch (cursormode) { case "dvd": pos.x += vel.x; pos.y += vel.y; if (pos.x >= 50) { - vel.x = -vel.x; + vel.x = -vel.x; } if (pos.y >= 50) { - vel.y = -vel.y; + vel.y = -vel.y; } if (pos.x <= -50) { - vel.x = -vel.x; + vel.x = -vel.x; } if (pos.y <= -50) { - vel.y = -vel.y; + vel.y = -vel.y; } - if ((pos.x >= 50) && (pos.y >= 50)) { + if (pos.x >= 50 && pos.y >= 50) { stats.cornerhits += 1; - } else if ((pos.x >= 50) && (pos.y <= -50)) { + } else if (pos.x >= 50 && pos.y <= -50) { stats.cornerhits += 1; - } else if ((pos.x <= -50) && (pos.y <= -50)) { + } else if (pos.x <= -50 && pos.y <= -50) { stats.cornerhits += 1; - } else if ((pos.x <= -50) && (pos.y >= 50)) { + } else if (pos.x <= -50 && pos.y >= 50) { stats.cornerhits += 1; - } else if ((pos.x >= 50) || (pos.y >= 50) || (pos.y <= -50) || (pos.x <= -50)) { + } else if (pos.x >= 50 || pos.y >= 50 || pos.y <= -50 || pos.x <= -50) { stats.edgehits += 1; } let statsjson = JSON.stringify(stats); - fs.writeFile("stats.json", statsjson, 'utf8', function (err) { + fs.writeFile("stats.json", statsjson, "utf8", function (err) { if (err) { console.log("stats.json couldn't be saved!"); return console.log(err); @@ -108,4 +123,4 @@ var cursorupdate = setInterval(function() { }); break; } -}, 25); +}, 1000 / 30); diff --git a/stats.json b/stats.json index 0637a08..e68ecf7 100644 --- a/stats.json +++ b/stats.json @@ -1 +1 @@ -[] \ No newline at end of file +{"edgehits":67,"cornerhits":0} \ No newline at end of file