linting
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
isModerator,
|
||||
levels,
|
||||
getUserDetails,
|
||||
getAppearance,
|
||||
} from '../utility/_UAC.js';
|
||||
|
||||
/**
|
||||
|
||||
@@ -81,9 +81,19 @@ export async function run({
|
||||
|
||||
for (let i = 0, j = targetClients.length; i < j; i += 1) {
|
||||
if (targetClients[i].level >= socket.level) {
|
||||
|
||||
server.reply({
|
||||
cmd: 'warn',
|
||||
text: 'Failed to set level: Target has same or better credentials.',
|
||||
id: Errors.SetLevel.BAD_LEVEL,
|
||||
channel: socket.channel, // @todo Multichannel
|
||||
}, socket);
|
||||
} else {
|
||||
const setError = setChannelTripLevel(core.appConfig.data, socket.channel, payload.trip, newLevel);
|
||||
const setError = setChannelTripLevel(
|
||||
core.appConfig.data,
|
||||
socket.channel,
|
||||
payload.trip,
|
||||
newLevel,
|
||||
);
|
||||
|
||||
if (setError !== '') {
|
||||
return server.reply({
|
||||
@@ -97,7 +107,7 @@ export async function run({
|
||||
targetClients[i].color = color;
|
||||
targetClients[i].flair = flair;
|
||||
targetClients[i].level = newLevel;
|
||||
|
||||
|
||||
server.broadcast({
|
||||
...getUserDetails(targetClients[i]),
|
||||
...{
|
||||
|
||||
@@ -51,7 +51,7 @@ export async function run({
|
||||
return server.reply({
|
||||
cmd: 'warn',
|
||||
text: 'Invalid flair',
|
||||
id: 11111,//Errors.ChangeColor.INVALID_COLOR,
|
||||
id: 11111, // Errors.ChangeColor.INVALID_COLOR,
|
||||
channel, // @todo Multichannel
|
||||
}, socket);
|
||||
}
|
||||
@@ -124,7 +124,7 @@ export function flairCheck({
|
||||
server.reply({
|
||||
cmd: 'warn',
|
||||
text: 'Refer to `/help forceflair` for instructions on how to use this command.',
|
||||
id: 11111,//Errors.ForceColor.MISSING_NICK,
|
||||
id: 11111, // Errors.ForceColor.MISSING_NICK,
|
||||
channel: socket.channel, // @todo Multichannel
|
||||
}, socket);
|
||||
|
||||
@@ -135,7 +135,7 @@ export function flairCheck({
|
||||
server.reply({
|
||||
cmd: 'warn',
|
||||
text: 'Invalid newFlair',
|
||||
id: 11111,//Errors.ChangeColor.INVALID_COLOR,
|
||||
id: 11111, // Errors.ChangeColor.INVALID_COLOR,
|
||||
channel: socket.channel, // @todo Multichannel
|
||||
}, socket);
|
||||
|
||||
|
||||
Generated
+243
-387
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -32,7 +32,7 @@
|
||||
"dependencies": {
|
||||
"ascii-captcha": "^0.0.3",
|
||||
"enquirer": "^2.3.6",
|
||||
"hackchat-server": "^2.3.1",
|
||||
"hackchat-server": "^2.3.2",
|
||||
"http-server": "^14.1.0",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"lowdb": "^3.0.0",
|
||||
|
||||
+2
-2
@@ -184,8 +184,8 @@ const setupChannels = async () => {
|
||||
ownerTrip: 'Admin',
|
||||
lastAccessed: now,
|
||||
claimExpires: expirationDate,
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
for (let i = 0, j = config.data.publicChannels.length; i < j; i += 1) {
|
||||
const channelHash = getChannelHash(config.data.publicChannels[i]);
|
||||
|
||||
Reference in New Issue
Block a user