small bug fix with flair

This commit is contained in:
marzavec
2025-03-16 00:13:55 -07:00
parent b5f09957e9
commit c0bca44f0f
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -135,6 +135,8 @@ export function chatHook({
updateChannelSettings(core.appConfig.data, socket.channel, channelSettings);
console.log(`[${socket.trip}]${socket.nick} claimed ?${socket.channel}`);
server.broadcast({
cmd: 'info', // @todo Add numeric info code as `id`
text: `Channel now owned by "${socket.trip}", until ${channelSettings.claimExpires}`,
+5
View File
@@ -10,6 +10,7 @@ import {
isModerator,
getUserDetails,
levels,
getAppearance,
} from '../utility/_UAC.js';
import {
Errors,
@@ -74,9 +75,13 @@ export async function run({
channel: socket.channel,
});
const { color, flair } = getAppearance(levels.default);
for (let i = 0, j = targetClients.length; i < j; i += 1) {
if (!isModerator(targetClients[i].level)) {
targetClients[i].level = levels.default;
targetClients[i].color = color;
targetClients[i].flair = flair;
server.broadcast({
...getUserDetails(targetClients[i]),