change moderation logs again

This commit is contained in:
HF 2022-04-01 17:59:46 +02:00
parent 1b3a54224f
commit ba20d6fcf3
2 changed files with 30 additions and 28 deletions

View File

@ -1,4 +1,4 @@
/* @flow
/*
*
* functions to deal with images
*
@ -27,14 +27,14 @@ import Palette from './Palette';
* @param height height of image
*/
export async function imageABGR2Canvas(
canvasId: number,
x: number,
y: number,
data: Buffer,
width: number,
height: number,
wipe?: boolean,
protect?: boolean,
canvasId,
x,
y,
data,
width,
height,
wipe,
protect,
) {
logger.info(
`Loading image with dim ${width}/${height} to ${x}/${y}/${canvasId}`,
@ -108,12 +108,12 @@ export async function imageABGR2Canvas(
* it will be called with the pixelcolor as argument, its return value gets set
*/
export async function imagemask2Canvas(
canvasId: number,
x: number,
y: number,
data: Buffer,
width: number,
height: number,
canvasId,
x,
y,
data,
width,
height,
filter,
) {
logger.info(
@ -180,12 +180,12 @@ export async function imagemask2Canvas(
* @param height height of image
*/
export async function protectCanvasArea(
canvasId: number,
x: number,
y: number,
width: number,
height: number,
protect: boolean = true,
canvasId,
x,
y,
width,
height,
protect = true,
) {
logger.info(
// eslint-disable-next-line max-len

View File

@ -151,7 +151,7 @@ export async function executeImageAction(
);
// eslint-disable-next-line max-len
if (logger) logger(`Loaded image wth ${pxlCount} pixels to #${canvas.ident},${x},${y}`);
if (logger) logger(`Loaded image wth ${pxlCount} pixels to #${canvas.ident},${x},${y} (${x}_${y} - ${x + info.width - 1}_${y + info.height - 1}`);
return [
200,
`Successfully loaded image wth ${pxlCount} pixels to ${x}/${y}`,
@ -264,17 +264,19 @@ export async function executeProtAction(
if (logger) {
logger(
(protect)
? `Protect ${width}x${height} area at #${canvas.ident},${x},${y}`
: `Unprotect ${width}x${height} area at #${canvas.ident},${x},${y}`,
// eslint-disable-next-line max-len
? `Protect ${width}x${height} area at #${canvasid},${x},${y} with ${pxlCount}pxls (${ulcoor} - ${brcoor})`
// eslint-disable-next-line max-len
: `Unprotect ${width}x${height} area at #${canvasid},${x},${y} with ${pxlCount}pxls (${ulcoor} - ${brcoor})`,
);
}
return [
200,
(protect)
// eslint-disable-next-line max-len
? `Successfully protected ${pxlCount} pixels at ${x} / ${y} with dimension ${width}x${height}`
? `Successfully protected ${width}x${height} area at #${canvasid},${x},${y} with ${pxlCount}pxls (${ulcoor} - ${brcoor})`
// eslint-disable-next-line max-len
: `Soccessfully unprotected ${pxlCount} pixels at ${x} / ${y} with dimension ${width}x${height}`,
: `Successfully unprotected ${width}x${height} area at #${canvasid},${x},${y} with ${pxlCount}pxls (${ulcoor} - ${brcoor})`,
];
}
@ -336,13 +338,13 @@ export async function executeRollback(
if (logger) {
logger(
// eslint-disable-next-line max-len
`Rollback to ${date} for ${pxlCount} pixels with dimension ${width}x${height} at #${canvas.ident},${x},${y}`,
`Rollback to ${date} for ${width}x${height} area at #${canvas.ident},${x},${y} with ${pxlCount}pxls (${ulcoor} - ${brcoor})`,
);
}
return [
200,
// eslint-disable-next-line max-len
`Successfully rolled back ${pxlCount} pixels at ${x} / ${y} with dimension ${width}x${height}`,
`Successfully rolled back to ${date} for ${width}x${height} area at #${canvas.ident},${x},${y} with ${pxlCount}pxls (${ulcoor} - ${brcoor})`,
];
}