fixing some labels

This commit is contained in:
marzavec
2025-03-11 11:51:16 -07:00
parent c4f0396cfb
commit 9dc53eddef
9 changed files with 22 additions and 13 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ export async function run({
if (!socket.trip) {
return server.reply({
cmd: 'warn',
text: 'Failed to run command: Missing trip code.',
text: 'Failed to run command: You must have a trip code to do this.',
id: Errors.Global.MISSING_TRIPCODE,
channel: socket.channel, // @todo Multichannel
}, socket);
+1 -1
View File
@@ -30,7 +30,7 @@ export async function run({
if (!socket.trip) {
return server.reply({
cmd: 'warn',
text: 'Failed to run command: Missing trip code.',
text: 'Failed to run command: You must have a trip code to do this.',
id: Errors.Global.MISSING_TRIPCODE,
channel: socket.channel, // @todo Multichannel
}, socket);
+1 -1
View File
@@ -35,7 +35,7 @@ export async function run({
if (!socket.trip) {
return server.reply({
cmd: 'warn',
text: 'Failed to run command: Missing trip code.',
text: 'Failed to run command: You must have a trip code to do this.',
id: Errors.Global.MISSING_TRIPCODE,
channel: socket.channel, // @todo Multichannel
}, socket);
+1 -1
View File
@@ -36,7 +36,7 @@ export async function run({
if (!socket.trip) {
return server.reply({
cmd: 'warn',
text: 'Failed to run command: Missing trip code.',
text: 'Failed to run command: You must have a trip code to do this.',
id: Errors.Global.MISSING_TRIPCODE,
channel: socket.channel, // @todo Multichannel
}, socket);
+1 -1
View File
@@ -67,7 +67,7 @@ export async function run({
return server.reply({
cmd: 'warn',
text: 'Failed to set level: New level may not be the same or greater than your own.',
id: Errors.SetLevel.BAD_LEVEL,
id: Errors.SetLevel.LEVEL_CONFLICT,
channel: socket.channel, // @todo Multichannel
}, socket);
}
+1 -1
View File
@@ -36,7 +36,7 @@ export async function run({
if (!socket.trip) {
return server.reply({
cmd: 'warn',
text: 'Failed to run command: Missing trip code.',
text: 'Failed to run command: You must have a trip code to do this.',
id: Errors.Global.MISSING_TRIPCODE,
channel: socket.channel, // @todo Multichannel
}, socket);
+4 -4
View File
@@ -51,7 +51,7 @@ export async function run({
return server.reply({
cmd: 'warn',
text: 'Invalid flair',
id: 11111, // Errors.ChangeColor.INVALID_COLOR,
id: Errors.ForceFlairErrors.INVALID_FLAIR,
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: Errors.ForceFlairErrors.MISSING_NICK,
channel: socket.channel, // @todo Multichannel
}, socket);
@@ -134,8 +134,8 @@ export function flairCheck({
if (input[2] === undefined) {
server.reply({
cmd: 'warn',
text: 'Invalid newFlair',
id: 11111, // Errors.ChangeColor.INVALID_COLOR,
text: 'Invalid flair',
id: Errors.ForceFlairErrors.INVALID_FLAIR,
channel: socket.channel, // @todo Multichannel
}, socket);
+2 -2
View File
@@ -163,12 +163,12 @@ export function runKickCheck({
if (payload.text.startsWith('/kick ')) {
const input = payload.text.split(' ');
// If there is no trip parameter
// If there is no nick parameter
if (!input[1]) {
server.reply({
cmd: 'warn',
text: 'Failed to kick: Missing name. Refer to `/help kick` for instructions on how to use this command.',
id: 111111, // Errors.SetLevel.BAD_TRIP,
id: Errors.Global.UNKNOWN_USER, // this is wrong #lazydev
channel: socket.channel, // @todo Multichannel
}, socket);
+10 -1
View File
@@ -31,7 +31,8 @@ const ChangeColorErrors = UnclaimChannelErrors + 10;
const EmoteErrors = ChangeColorErrors + 10;
const WhisperErrors = EmoteErrors + 10;
const ForceColorErrors = WhisperErrors + 10;
const UsersErrors = ForceColorErrors + 10;
const ForceFlairErrors = ForceColorErrors + 10;
const UsersErrors = ForceFlairErrors + 10;
/**
* Holds the numeric id values for each error type
@@ -103,6 +104,7 @@ export const Errors = {
BAD_LABEL: SetLevelErrors + 2,
BAD_LEVEL: SetLevelErrors + 3,
APPLY_ERROR: SetLevelErrors + 4,
LEVEL_CONFLICT: SetLevelErrors + 5,
},
SetMOTD: {
@@ -131,6 +133,11 @@ export const Errors = {
MISSING_NICK: ForceColorErrors + 1,
},
ForceFlairErrors: {
INVALID_FLAIR: ForceFlairErrors + 1,
MISSING_NICK: ForceFlairErrors + 2,
},
Users: {
BAD_HASH_OR_IP: UsersErrors + 1,
},
@@ -162,6 +169,8 @@ export const SystemMOTDs = [
'Protip: Use a password or add a "#" followed by a password to get a trip code',
'Protip: You can claim an unclaimed channel by using /claimchannel',
'Protip: You can send emotes like: /me does a thing',
'Protip: The owner of a channel can create moderators: /setlevel <trip> channelModerator',
'Protip: A moderator can kick people from the room: /kick <name>',
];
/**