This commit is contained in:
Hri7566 2021-04-13 17:44:28 -04:00
parent 6da7438f8e
commit ae1cc86e45
2 changed files with 2 additions and 2 deletions

View File

@ -190,7 +190,7 @@ module.exports = (cl) => {
if(!cl.quotas.userset.attempt()) return;
cl.user.name = msg.set.name;
let user = new User(cl);
Database.getUserData(cl, cl.server).then((usr) => {
Database.getUserData().then((usr) => {
let dbentry = user.userdb.get(cl.user._id);
if (!dbentry) return;
dbentry.name = msg.set.name;

View File

@ -3,7 +3,7 @@ const Database = require("./Database");
class User {
constructor(cl, data) {
this.server = cl.server;
this.name = typeof(data.name) == 'string' ? data.name : "Anonymous";
this.name = data.name;
this._id = data._id;
this.color = data.color;
this.ip = data.ip;