diff --git a/server/src/commands/utility/UAC/_info.js b/server/src/commands/utility/UAC/_info.js index c5010a6..7981afc 100644 --- a/server/src/commands/utility/UAC/_info.js +++ b/server/src/commands/utility/UAC/_info.js @@ -90,6 +90,23 @@ export function isTrustedUser(level) { return level >= levels.trustedUser; } +/** + * Return an object containing public information about the socket + * @public + * @param {WebSocket} socket Target client + * @return {Object} + */ +export function getUserDetails(socket) { + return { + uType: socket.uType, + nick: socket.nick, + trip: socket.trip || 'null', + hash: socket.hash, + level: socket.level, + userid: socket.userid, + }; +} + /** * Returns true if the nickname is valid * @public