diff --git a/src/class/Util.ts b/src/class/Util.ts index f834f51..11e61d3 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -150,9 +150,10 @@ export default class Util { public async createAccount(hash: string, etcPasswd: string, username: string, userID: string, emailAddress: string, moderatorID: string, code: string): Promise { await this.exec(`useradd -m -p ${hash} -c ${etcPasswd} -s /bin/bash ${username}`); await this.exec(`chage -d0 ${username}`); + const tier = await this.client.db.Tier.findOne({ id: 1 }); const account = new this.client.db.Account({ - username, userID, emailAddress, createdBy: moderatorID, createdAt: new Date(), locked: false, tier: 1, supportKey: code, ssInit: false, homepath: `/home/${username}`, + username, userID, emailAddress, createdBy: moderatorID, ramLimitNotification: tier.resourceLimits.ram - 20, createdAt: new Date(), locked: false, tier: 1, supportKey: code, ssInit: false, homepath: `/home/${username}`, }); return account.save(); }