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