From 4aa21cab5cf58d2899292ba49f718b5708a64e6a Mon Sep 17 00:00:00 2001 From: WlodekM Date: Tue, 26 Nov 2024 10:41:27 +0200 Subject: eugh i spent 2 hours on this --- ranks.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ranks.js') diff --git a/ranks.js b/ranks.js index 6f7d9b4..78cab46 100644 --- a/ranks.js +++ b/ranks.js @@ -1,7 +1,7 @@ -import fs from 'fs'; -import path from 'path'; -import * as accounts from './accounts.js' -import { commands } from "./commands.js"; +import fs from 'node:fs'; +import path from 'node:path'; +import * as accounts from './accounts.ts' +import { commands } from "./commands.ts"; export function getRankData(name) { if (!/^[^\/\\]*$/g.exec(name)) return null; @@ -12,7 +12,7 @@ export function getRankData(name) { export function canUserDoCommand(command, username, guest=false) { let permissionLevel = 0; if (!guest) { - let accountData = accounts.getAccountData(username); + const accountData = accounts.getAccountData(username); if (getRankData(accountData?.admin ? 'admin' : accountData?.rank)) permissionLevel = getRankData(accountData?.admin ? 'admin' : accountData?.rank).level; } // Banned users can be given a rank with negative permissions so that no commands can be ran -- cgit 1.4.1-2-gfad0