small bug fix with flair
This commit is contained in:
@@ -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}`,
|
||||
|
||||
@@ -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]),
|
||||
|
||||
Reference in New Issue
Block a user