summary refs log tree commit diff
path: root/commands.js
diff options
context:
space:
mode:
authorWlodekM <[email protected]>2024-08-10 15:29:07 +0300
committerWlodekM <[email protected]>2024-08-10 15:29:07 +0300
commitd952979c5ab76a572da7cf9eede76095be0dbb88 (patch)
treeaabc417ea0e237d260dba9dd8d8cba4a48f12918 /commands.js
parent2153957b0905cdda3d74c4e062bb75dbd96f96e7 (diff)
wip ranks
Diffstat (limited to 'commands.js')
-rw-r--r--commands.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands.js b/commands.js
index 456c6a7..9cc95f3 100644
--- a/commands.js
+++ b/commands.js
@@ -118,8 +118,8 @@ export const commands = {
             if (args[0].length < 3) return user.socket.send(`Username too short!`);
             if (args[0].length > 20) return user.socket.send(`Username too long!`);
             if (args[1].length < 6) return user.socket.send(`Password too short!`);
-            if (server.accounts.checkAccount(args[0])) return user.socket.send(`User with username "${args[0]}" already exists!`);
-            server.accounts.createAccount(args[0], args[1]);
+            if (server.accounts.checkAccountLoose(args[0])) return user.socket.send(`User with username "${args[0]}" already exists!`);
+            server.accounts.createAccount(args[0], args[1], args[0] == server.config.owner);
             if (server.config.saveIP) server.accounts.logIP(args[0], user.ip);
             sendInChannel(`${user.name()} logged in as ${args[0]}!`, user.channel);
             user.username = args[0];