summary refs log tree commit diff
path: root/ranks.js
diff options
context:
space:
mode:
authorWlodekM <[email protected]>2024-11-26 10:41:27 +0200
committerWlodekM <[email protected]>2024-11-26 10:41:27 +0200
commit4aa21cab5cf58d2899292ba49f718b5708a64e6a (patch)
treed064d8562282a3e94073dd783537ea8ad22dc033 /ranks.js
parentae159f6d6cb2d5ab933730a3c07903452df8c1ef (diff)
eugh i spent 2 hours on this
Diffstat (limited to 'ranks.js')
-rw-r--r--ranks.js10
1 files changed, 5 insertions, 5 deletions
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