summary refs log tree commit diff
diff options
context:
space:
mode:
authorWlodekM <[email protected]>2024-11-30 12:21:57 +0200
committerWlodekM <[email protected]>2024-11-30 12:21:57 +0200
commitf37e3537adb59f2b724259a1720295756eb94277 (patch)
treea0f9c379ecdeb575d826b99442ec4df49b5137be
parent6cb6085e508b3b72697924490bad517546bdec71 (diff)
fix /users
-rw-r--r--commands.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/commands.ts b/commands.ts
index 8a93c8a..fbde383 100644
--- a/commands.ts
+++ b/commands.ts
@@ -87,9 +87,9 @@ export const commands: {[key: string]: Command} = {
         aliases: [],
         command({ user, server, args }) {
             user.socket.send(
-                `Users${args[0] != "global" ? ` in ${user.channel}` : ""}:\n${Object.values(server.users)
-                    .filter((usr) => usr.channel == user.channel || args[0] == "global")
-                    .map((usr) => ` * ${usr.name()}`)
+                `Users${args[0] != "global" ? ` in ${user.channel}` : ""}:\n${[...server.users.entries()]
+                    .filter(([_, usr]) => usr.channel == user.channel || args[0] == "global")
+                    .map<string>(([_, usr]) => ` * ${usr.name()}`)
                     .join("\n")}`
             );
         },