diff --git a/server/ideas.md b/server/ideas.md index c011650..905686c 100755 --- a/server/ideas.md +++ b/server/ideas.md @@ -108,3 +108,15 @@ Each group chat has a name. - Homes that players can own or build. - Like `Rogue` but with tweaks such as detailed descriptions of the cool stuff the players have done with the room. + +``` + ____ _ _ _ _ ____ +| _ \| | | | \ | / ___| +| |_) | | | | \| \___ \ +| __/| |_| | |\ |___) | +|_| \___/|_| \_|____/ +``` + +- Waif-Unction Collabs +- Waify Collapse +- Drag-on lance diff --git a/server/models/session.js b/server/models/session.js index caeaa5e..dcfa728 100755 --- a/server/models/session.js +++ b/server/models/session.js @@ -117,7 +117,7 @@ export class Session { } /** @param {string|string[]} errorMessage */ - sendError(errorMessage, options = { verbatim: true }) { + sendError(errorMessage, options = { verbatim: true, error: true }) { this.send(MessageType.ERROR, mustBeString(errorMessage), options); } @@ -128,7 +128,8 @@ export class Session { calamity(errorMessage) { // // The client should know not to format calamaties anyway, but we add “preformatted” anyway - this.send(MessageType.CALAMITY, errorMessage, { preformatted: true }); + console.info("CALAMITY", errorMessage); + this.send(MessageType.CALAMITY, errorMessage, { verbatim: true, calamity: true }); this.close(); } diff --git a/server/package-lock.json b/server/package-lock.json index dd369ec..2c68563 100755 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -14,13 +14,351 @@ "ws": "^8.14.2" }, "devDependencies": { + "concurrently": "^9.2.1", "nodemon": "^3.0.1", - "prettier": "3.6.2" + "prettier": "3.6.2", + "sass": "^1.92.1" }, "engines": { "node": ">=14.0.0" } }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", + "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", + "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", + "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", + "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", + "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", + "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", + "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", + "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", + "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", + "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", + "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", + "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", + "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", + "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -79,6 +417,46 @@ "node": ">=8" } }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -104,6 +482,41 @@ "fsevents": "~2.3.2" } }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -111,6 +524,57 @@ "dev": true, "license": "MIT" }, + "node_modules/concurrently": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.1.tgz", + "integrity": "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "4.1.2", + "rxjs": "7.8.2", + "shell-quote": "1.8.3", + "supports-color": "8.1.1", + "tree-kill": "1.2.2", + "yargs": "17.7.2" + }, + "bin": { + "conc": "dist/bin/concurrently.js", + "concurrently": "dist/bin/concurrently.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/debug": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", @@ -129,6 +593,37 @@ } } }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/figlet": { "version": "1.8.2", "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.8.2.tgz", @@ -169,6 +664,16 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -199,6 +704,13 @@ "dev": true, "license": "ISC" }, + "node_modules/immutable": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.3.tgz", + "integrity": "sha512-+chQdDfvscSF1SJqv2gn4SRO2ZyS3xL3r7IW/wWEEzrzLisnOlKiQu5ytC/BVNcS15C39WT2Hg/bjKjDMcu+zg==", + "dev": true, + "license": "MIT" + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -222,6 +734,16 @@ "node": ">=0.10.0" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -245,6 +767,21 @@ "node": ">=0.12.0" } }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -265,6 +802,14 @@ "dev": true, "license": "MIT" }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "dev": true, + "license": "MIT", + "optional": true + }, "node_modules/nodemon": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.10.tgz", @@ -353,6 +898,77 @@ "node": ">=8.10.0" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/sass": { + "version": "1.92.1", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.92.1.tgz", + "integrity": "sha512-ffmsdbwqb3XeyR8jJR6KelIXARM9bFQe8A6Q3W4Klmwy5Ckd5gz7jgUNHo4UOqutU5Sk1DtKLbpDP0nLCg1xqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.0", + "immutable": "^5.0.2", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" + } + }, + "node_modules/sass/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/sass/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/semver": { "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", @@ -366,6 +982,19 @@ "node": ">=10" } }, + "node_modules/shell-quote": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz", + "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/simple-update-notifier": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", @@ -379,12 +1008,50 @@ "node": ">=10" } }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/sprintf-js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", "license": "BSD-3-Clause" }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -421,6 +1088,23 @@ "nodetouch": "bin/nodetouch.js" } }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, "node_modules/undefsafe": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", @@ -428,6 +1112,24 @@ "dev": true, "license": "MIT" }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/ws": { "version": "8.18.3", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", @@ -448,6 +1150,45 @@ "optional": true } } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } } } } diff --git a/server/package.json b/server/package.json index 0403aec..22b3a22 100755 --- a/server/package.json +++ b/server/package.json @@ -5,8 +5,11 @@ "main": "server.js", "type": "module", "scripts": { - "start": "MUUHD_ENV=prod node server.js", - "dev": "MUUHD_ENV=dev nodemon server.js" + "server:start": "MUUHD_ENV=prod node server.js", + "server:dev": "MUUHD_ENV=dev nodemon server.js", + "frontend:build": "vite build frontend", + "frontend:dev": "vite frontend" + "dev": "concurrently \"npm run server:dev\" \"npm run frontend:dev\"", }, "keywords": [ "mud", @@ -22,6 +25,7 @@ "ws": "^8.14.2" }, "devDependencies": { + "concurrently": "^9.2.1", "nodemon": "^3.0.1", "prettier": "3.6.2" }, diff --git a/server/public/client.js b/server/public/client.js index a30aebf..63a121e 100755 --- a/server/public/client.js +++ b/server/public/client.js @@ -40,7 +40,7 @@ class MUDClient { this.digest = "SHA-256"; /** @type {string} Salt string to use for client-side password hashing */ - this.salt = "No salt, no shorts, no service"; + this.salt = "no_salt_no shorts_no_service"; /** @type {string} Number of times the hashing should be done */ this.rounds = 1000; @@ -182,7 +182,7 @@ class MUDClient { // The quit command has its own message type if (inputText === ":quit") { this.send(MessageType.QUIT); - this.writeToOutput("> " + inputText, { verbatim: true, class: "input" }); + this.echo(inputText); return; } @@ -199,7 +199,7 @@ class MUDClient { if (help) { console.log("here"); help[1] ? this.send(MshType.HELP, help[1].trim()) : this.send(MshType.HELP); - this.writeToOutput("> " + inputText, { verbatim: true, class: "input" }); + this.echo(inputText); return; } @@ -213,7 +213,7 @@ class MUDClient { if (colon) { const args = typeof colon[2] === "string" ? parseArgs(colon[2]) : []; this.send(MessageType.COLON, colon[1], args); - this.writeToOutput("> " + inputText, { verbatim: true, class: "input colon" }); + this.echo(inputText); return; } @@ -235,7 +235,11 @@ class MUDClient { // The server wants a password, let's hash it before sending it. if (this.promptOptions.password) { - inputText = await this.hashPassword(inputText); + const pwHash = await this.hashPassword(inputText); + this.send(MessageType.REPLY, pwHash); + this.shouldReply = false; + this.promptOptions = {}; + return; } // @@ -251,7 +255,7 @@ class MUDClient { // // We add our own command to the output stream so the // player can see what they typed. - this.writeToOutput("> " + inputText, { verbatim: true, class: "input" }); + this.echo(inputText); return; } @@ -411,6 +415,10 @@ class MUDClient { return; } + echo(text) { + this.writeToOutput(text, { verbatim: true, echo: true }); + } + /** * Add output to the text. * @param {string} text @@ -430,6 +438,12 @@ class MUDClient { element.innerHTML = crackdown(line); } + for (const cls of ["calamity", "error", "debug", "prompt", "echo"]) { + if (options[cls]) { + element.classList.add(cls); + } + } + this.output.appendChild(element); this.output.scrollTop = this.output.scrollHeight; } diff --git a/server/public/crackdown.js b/server/public/crackdown.js index b446bae..c01315c 100755 --- a/server/public/crackdown.js +++ b/server/public/crackdown.js @@ -11,7 +11,7 @@ // | .__/ \__,_|_| |___/\___|_| // |_| -const capture = "([a-zA-Z0-9:()-](?:.*[a-zA-Z0-9:()-])?)"; +const capture = "([a-z0-9:()-](?:.*[a-zA-Z:().!-])?)"; const skipSpace = "\\s*"; const htmlEscapeRegex = /[&<>"'`]/g; // used to escape html characters @@ -26,7 +26,7 @@ const opcodes = [ ["(^|\\n)==", "($|\\n)", "$1

$2

$3"], ["---", "---", "$1"], ["___", "___", "$1"], - ["(?:[.]{3})", "(?:[.]{3})", "$1"], + ["(?:[,]{3})", "(?:[,]{3})", "$1"], ["(?:[(]{2})", "(?:[)]{2})", "$1"], ["_", "_", "$1"], ["\\*", "\\*", "$1"], @@ -35,8 +35,10 @@ const opcodes = [ /** @type{Array.Array.} */ const regexes = []; +// +// Pre-compile all regexes for (const [left, right, replacement] of opcodes) { - regexes.push([new RegExp(left + skipSpace + capture + skipSpace + right, "g"), replacement]); + regexes.push([new RegExp(left + skipSpace + capture + skipSpace + right, "gi"), replacement]); } /** @param {string} text */ diff --git a/server/public/index.html b/server/public/index.html index 2cea327..5886733 100755 --- a/server/public/index.html +++ b/server/public/index.html @@ -7,6 +7,7 @@ +
diff --git a/server/public/site.webmanifest b/server/public/manifest.json old mode 100644 new mode 100755 similarity index 100% rename from server/public/site.webmanifest rename to server/public/manifest.json diff --git a/server/public/style.css b/server/public/style.css index 23c3a63..c0332ea 100755 --- a/server/public/style.css +++ b/server/public/style.css @@ -101,12 +101,22 @@ h2 { color: #ffaa00; } +/* +*/ .error { color: #ff4444; } -.input { - color: #666; +.calamity { + color: #f00; + text-decoration: wavy underline rgb(100 0% 00 / 40%); +} + +.echo { + color: #888; +} +.echo::before { + content: "> "; } .debug { @@ -114,7 +124,7 @@ h2 { } .prompt { - color: #00ccff; + color: #aaa; } .bold { @@ -139,12 +149,5 @@ h2 { .faint { opacity: 0.42; -} - -.fBlue { - color: blue; -} - -.bRed { - background-color: red; + color: #44f; } diff --git a/server/scenes/authentication/authenticationScene.js b/server/scenes/authentication/authenticationScene.js index fab2af6..8c26578 100755 --- a/server/scenes/authentication/authenticationScene.js +++ b/server/scenes/authentication/authenticationScene.js @@ -2,12 +2,12 @@ import { PasswordPrompt } from "./passwordPrompt.js"; import { Player } from "../../models/player.js"; import { Scene } from "../scene.js"; import { UsernamePrompt } from "./usernamePrompt.js"; -import { CreateUsernamePrompt } from "../playerCreation/createUsernamePrompt.js"; +import { PlayerCreationScene } from "../playerCreation/playerCreationSene.js"; /** @property {Session} session */ export class AuthenticationScene extends Scene { introText = [ - "= Welcome", // + "= Welcome!", // ]; /** @type {Player} */ @@ -21,6 +21,7 @@ export class AuthenticationScene extends Scene { /** @param {Player} player */ usernameAccepted(player) { this.player = player; + this.session.sendSystemMessage("salt", player.salt); this.show(PasswordPrompt); } @@ -28,6 +29,9 @@ export class AuthenticationScene extends Scene { this.player.loggedIn = true; this.session.player = this.player; + this.session.sendText(["= Success!", "((but I don't know what to do now...))"]); + return; + if (this.player.admin) { this.session.setScene("new AdminJustLoggedInScene"); } else { @@ -35,7 +39,12 @@ export class AuthenticationScene extends Scene { } } - createPlayer() { - scene.session.setScene(new PlayerCreationScene(this.scene)); + /** + * User typed `:create` + * + * Create new player + */ + onColon__create() { + this.session.setScene(new PlayerCreationScene(this.session)); } } diff --git a/server/scenes/authentication/passwordPrompt.js b/server/scenes/authentication/passwordPrompt.js index 377d082..094ced3 100755 --- a/server/scenes/authentication/passwordPrompt.js +++ b/server/scenes/authentication/passwordPrompt.js @@ -1,6 +1,7 @@ import { Prompt } from "../prompt.js"; import * as security from "../../utils/security.js"; import { Config } from "../../config.js"; +import { AuthenticationScene } from "./authenticationScene.js"; export class PasswordPrompt extends Prompt { // @@ -15,6 +16,11 @@ export class PasswordPrompt extends Prompt { return this.scene.player; } + /** @returns {AuthenticationScene} */ + get scene() { + return this._scene; + } + onReply(text) { // // Check of the password is sane. This is both bad from a security point @@ -70,10 +76,8 @@ export class PasswordPrompt extends Prompt { return; } - this.scene.passwordAccepted(); - - // // Password was correct, go to main game - this.session.setState(new JustLoggedInState(this.session)); + // this.scene.passwordAccepted(); + this.scene.passwordAccepted(); } } diff --git a/server/scenes/authentication/usernamePrompt.js b/server/scenes/authentication/usernamePrompt.js index aebc096..2cc96c8 100755 --- a/server/scenes/authentication/usernamePrompt.js +++ b/server/scenes/authentication/usernamePrompt.js @@ -2,7 +2,6 @@ import { Player } from "../../models/player.js"; import { Prompt } from "../prompt.js"; import * as security from "../../utils/security.js"; import { gGame } from "../../models/globals.js"; -import { PlayerCreationScene } from "../playerCreation/playerCreationSene.js"; import { Config } from "../../config.js"; import { AuthenticationScene } from "./authenticationScene.js"; diff --git a/server/scenes/justLoggedIn/justLoggedInScene.js b/server/scenes/justLoggedIn/justLoggedInScene.js index 16dbfe2..2b2f861 100755 --- a/server/scenes/justLoggedIn/justLoggedInScene.js +++ b/server/scenes/justLoggedIn/justLoggedInScene.js @@ -1,6 +1,4 @@ import { Session } from "../models/session.js"; -import { PartyCreationState } from "./partyCreationState.js"; -import { AwaitCommandsState } from "./awaitCommands.js"; const castle = ` ▄ diff --git a/server/scenes/playerCreation/createUsernamePrompt.js b/server/scenes/playerCreation/createUsernamePrompt.js index 4ad0e6e..1578810 100755 --- a/server/scenes/playerCreation/createUsernamePrompt.js +++ b/server/scenes/playerCreation/createUsernamePrompt.js @@ -8,7 +8,7 @@ export class CreateUsernamePrompt extends Prompt { // promptText = [ "Enter your username", // - "((type *:help* for more info))" // + "((type *:help* for more info))", // ]; // @@ -25,27 +25,31 @@ export class CreateUsernamePrompt extends Prompt { // Let the client know that we're asking for a username promptOptions = { username: true }; - onReply(text) { + /** + * @returns {PlayerCreationScene} + */ + get scene() { + return this._scene; + } + + onReply(username) { // // do basic syntax checks on usernames - if (!security.isUsernameSane(text)) { - - console.info("Someone entered insane username: '%s'", text); - this.sendError( - "Incorrect username, try again.", - ); + if (!security.isUsernameSane(username)) { + console.info("Someone entered insane username: '%s'", username); + this.sendError("Incorrect username, try again."); this.execute(); return; } // // try and fetch the player object from the game - const player = gGame.getPlayer(text); + const player = gGame.getPlayer(username); // // handle invalid username if (player) { - console.info("Someone tried to create a user with an occupied username: '%s'", text); + console.info("Someone tried to create a user with an occupied username: '%s'", username); this.sendError("Occupied, try something else"); this.execute(); return; @@ -53,6 +57,6 @@ export class CreateUsernamePrompt extends Prompt { // // Tell daddy that we're done - this.scene.onUsernameAccepted(player); + this.scene.usernameAccepted(username); } } diff --git a/server/scenes/playerCreation/playerCreationSene.js b/server/scenes/playerCreation/playerCreationSene.js index 99fd6e8..0b495d2 100755 --- a/server/scenes/playerCreation/playerCreationSene.js +++ b/server/scenes/playerCreation/playerCreationSene.js @@ -33,7 +33,9 @@ export class PlayerCreationScene extends Scene { this.session.sendSystemMessage("salt", player.salt); this.session.sendText(`Username _*${username}*_ is available, and I've reserved it for you :)`); - this.showPrompt("new passwordprompt"); + + // + this.session.sendError("TODO: create a createPasswordPrompt and display it."); } /** @@ -47,10 +49,4 @@ export class PlayerCreationScene extends Scene { this.session.sendText("*_Success_* ✅ You will now be asked to log in again, sorry for that ;)"); this.player.setPasswordHash(security.generateHash(this.password)); } - - // - // User entered ":create" - onColon__create() { - this.scene.createPlayer(); - } } diff --git a/server/scenes/scene.js b/server/scenes/scene.js index c5dfd90..b2633de 100755 --- a/server/scenes/scene.js +++ b/server/scenes/scene.js @@ -79,7 +79,7 @@ export class Scene { // // Default: we have no handler for the Foo command if (property === undefined) { - this.session.sendError(`You cannot ${command.toUpperCase()} right now`, { verbatim: true }); // :foo ==> you cannot FOO right now + this.session.sendError(`You cannot ${command.toUpperCase()} right now`); // :foo ==> you cannot FOO right now return; } diff --git a/server/server.js b/server/server.js index d39dec6..51ba961 100755 --- a/server/server.js +++ b/server/server.js @@ -78,9 +78,12 @@ class MudServer { // // The file types we allow to be served. const contentTypes = { - ".js": "application/javascript", ".css": "text/css", ".html": "text/html", + ".ico": "image/x-icon", + ".js": "application/javascript", + ".json": "application/json", + ".png": "image/png", }; // @@ -145,7 +148,7 @@ class MudServer { // Check if message too big if (data.byteLength > Config.maxIncomingMessageSize) { console.error("Message was too big!", Config.maxIncomingMessageSize, data.byteLength); - session.calamity(254, "batman"); + session.calamity("batman"); return; }