Compare commits
5 Commits
5b30fbcd94
...
e9407a5fee
Author | SHA1 | Date |
---|---|---|
Hri7566 | e9407a5fee | |
Hri7566 | 2ce29e329f | |
Hri7566 | 0e67fb52cf | |
Hri7566 | f30883b903 | |
Hri7566 | bf35eca0fd |
|
@ -1,4 +1,4 @@
|
|||
DATABASE_URL="file:./db.sqlite"
|
||||
PORT=8443
|
||||
ADMINPASS=
|
||||
ADMIN_PASS=
|
||||
SALT=
|
||||
|
|
16
README.md
16
README.md
|
@ -14,7 +14,13 @@ The commit history includes BopItFreak's server because this server is (debatabl
|
|||
$ curl -fsSL https://bun.sh/install | bash
|
||||
```
|
||||
|
||||
1. Configure
|
||||
1. Setup Git submodules
|
||||
|
||||
```
|
||||
$ git submodule update --init --recursive
|
||||
```
|
||||
|
||||
2. Configure
|
||||
|
||||
- Copy environment variables
|
||||
|
||||
|
@ -26,26 +32,26 @@ The commit history includes BopItFreak's server because this server is (debatabl
|
|||
|
||||
- Edit the files in the `config` folder to match your needs
|
||||
|
||||
2. Install packages
|
||||
3. Install packages
|
||||
|
||||
```
|
||||
$ bun i
|
||||
```
|
||||
|
||||
3. Setup database
|
||||
4. Setup database
|
||||
|
||||
```
|
||||
$ bunx prisma generate
|
||||
$ bunx prisma db push
|
||||
```
|
||||
|
||||
4. Build
|
||||
5. Build
|
||||
|
||||
```
|
||||
$ bun run build
|
||||
```
|
||||
|
||||
5. Run
|
||||
6. Run
|
||||
|
||||
```
|
||||
$ bun start
|
||||
|
|
|
@ -93,14 +93,16 @@ export class Socket extends EventEmitter {
|
|||
this.id = foundSocket.id;
|
||||
}
|
||||
|
||||
this.loadUser();
|
||||
(async () => {
|
||||
await this.loadUser();
|
||||
|
||||
// TODO Permissions
|
||||
let isAdmin = false;
|
||||
// TODO Permissions
|
||||
let isAdmin = false;
|
||||
|
||||
this.setRateLimits(isAdmin ? adminLimits : userLimits);
|
||||
this.setRateLimits(isAdmin ? adminLimits : userLimits);
|
||||
|
||||
this.bindEventListeners();
|
||||
this.bindEventListeners();
|
||||
})();
|
||||
}
|
||||
|
||||
public getIP() {
|
||||
|
@ -133,7 +135,10 @@ export class Socket extends EventEmitter {
|
|||
// Does channel exist?
|
||||
if (channel) {
|
||||
// Exists, join normally
|
||||
channel.join(this);
|
||||
(async () => {
|
||||
await this.loadUser();
|
||||
channel.join(this);
|
||||
})();
|
||||
} else {
|
||||
// Doesn't exist, create
|
||||
channel = new Channel(
|
||||
|
|
Loading…
Reference in New Issue