This commit is contained in:
Hri7566 2022-09-11 01:57:50 -04:00
parent afdb3c71b9
commit 9dcb9728d8
2 changed files with 2 additions and 3 deletions

View File

@ -122,7 +122,7 @@ class Client extends EventEmitter {
userset(name, admin) { userset(name, admin) {
if (name.length > 40 && !admin) return; if (name.length > 40 && !admin) return;
if (!this.quotas.userset.attempt()) return; if (!this.quotas.userset.attempt()) return;
if (!this.user.hasFlag('freeze_name', true)) { if (!this.user.hasFlag('freeze_name', true) || admin) {
this.user.name = name; this.user.name = name;
Database.getUserData(this, this.server).then((usr) => { Database.getUserData(this, this.server).then((usr) => {
Database.updateUser(this.user._id, this.user); Database.updateUser(this.user._id, this.user);

View File

@ -247,7 +247,6 @@ module.exports = (cl) => {
}); });
cl.on("admin message", msg => { cl.on("admin message", msg => {
console.log(msg);
// if (!(cl.channel && cl.participantId)) return; // if (!(cl.channel && cl.participantId)) return;
if (!msg.hasOwnProperty('password') || !msg.hasOwnProperty('msg')) return; if (!msg.hasOwnProperty('password') || !msg.hasOwnProperty('msg')) return;
if (typeof msg.msg != 'object') return; if (typeof msg.msg != 'object') return;