From e10c557a8f79633f3fb5835ffa14830030f38ffb Mon Sep 17 00:00:00 2001 From: Hri7566 Date: Fri, 23 Sep 2022 23:46:06 -0400 Subject: [PATCH] wtf --- .env | 7 ------- src/Client.js | 20 ++++++++++++-------- 2 files changed, 12 insertions(+), 15 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index 7e73f38..0000000 --- a/.env +++ /dev/null @@ -1,7 +0,0 @@ -ADMINPASS=bacon sandwich -SALT=๖ۣۜH͜r̬i͡7566 -MONGO_URL=mongodb://7566:Phillies11@127.0.0.1/?authSource=admin&readPreference=primary&appname=MongoDB%20Compass&ssl=false -# MONGO_URL=mongodb://127.0.0.1:27017 -SSL=true - -MPPCLONE_TOKEN=056921b5199a52cf926baaed.15646cde-7a71-40d5-880c-5b283265c6fd diff --git a/src/Client.js b/src/Client.js index eda1a17..0bdbec9 100644 --- a/src/Client.js +++ b/src/Client.js @@ -121,18 +121,22 @@ class Client extends EventEmitter { */ userset(name, admin) { if (name.length > 40 && !admin) return; - if (!this.quotas.userset.attempt()) return; + if (this.quotas.userset) { + if (!this.quotas.userset.attempt()) return; + } if (!this.user.hasFlag('freeze_name', true) || admin) { this.user.name = name; - Database.getUserData(this, this.server).then((usr) => { - Database.updateUser(this.user._id, this.user); - - this.server.rooms.forEach((room) => { - room.updateParticipant(this.user._id, { - name: name + if (!this.user.hasFlag('freeze_name', true)) { + Database.getUserData(this, this.server).then((usr) => { + Database.updateUser(this.user._id, this.user); + + this.server.rooms.forEach((room) => { + room.updateParticipant(this.user._id, { + name: name + }); }); }); - }); + } } }