Compare commits

..

No commits in common. "e9407a5fee28e2faf2deffdf71e023015b27f458" and "5b30fbcd948bc5ca854f5d8b88aa5920f87052c7" have entirely different histories.

3 changed files with 12 additions and 23 deletions

View File

@ -1,4 +1,4 @@
DATABASE_URL="file:./db.sqlite" DATABASE_URL="file:./db.sqlite"
PORT=8443 PORT=8443
ADMIN_PASS= ADMINPASS=
SALT= SALT=

View File

@ -14,13 +14,7 @@ The commit history includes BopItFreak's server because this server is (debatabl
$ curl -fsSL https://bun.sh/install | bash $ curl -fsSL https://bun.sh/install | bash
``` ```
1. Setup Git submodules 1. Configure
```
$ git submodule update --init --recursive
```
2. Configure
- Copy environment variables - Copy environment variables
@ -32,26 +26,26 @@ The commit history includes BopItFreak's server because this server is (debatabl
- Edit the files in the `config` folder to match your needs - Edit the files in the `config` folder to match your needs
3. Install packages 2. Install packages
``` ```
$ bun i $ bun i
``` ```
4. Setup database 3. Setup database
``` ```
$ bunx prisma generate $ bunx prisma generate
$ bunx prisma db push $ bunx prisma db push
``` ```
5. Build 4. Build
``` ```
$ bun run build $ bun run build
``` ```
6. Run 5. Run
``` ```
$ bun start $ bun start

View File

@ -93,8 +93,7 @@ export class Socket extends EventEmitter {
this.id = foundSocket.id; this.id = foundSocket.id;
} }
(async () => { this.loadUser();
await this.loadUser();
// TODO Permissions // TODO Permissions
let isAdmin = false; let isAdmin = false;
@ -102,7 +101,6 @@ export class Socket extends EventEmitter {
this.setRateLimits(isAdmin ? adminLimits : userLimits); this.setRateLimits(isAdmin ? adminLimits : userLimits);
this.bindEventListeners(); this.bindEventListeners();
})();
} }
public getIP() { public getIP() {
@ -135,10 +133,7 @@ export class Socket extends EventEmitter {
// Does channel exist? // Does channel exist?
if (channel) { if (channel) {
// Exists, join normally // Exists, join normally
(async () => {
await this.loadUser();
channel.join(this); channel.join(this);
})();
} else { } else {
// Doesn't exist, create // Doesn't exist, create
channel = new Channel( channel = new Channel(