You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 07:26:18 +00:00
feat(communication): housekeeping ban-user + generic action-result
* HousekeepingBanUserComposer (OutgoingHeader 9102): (userId, reason, hours). * HousekeepingActionResultEvent + Parser (IncomingHeader 9201): generic ack carrying (actionKey, ok, actionId, message). Same parser will back mute / kick / give-credits / room-close / etc. callers — adding a new HK action only needs a new outgoing composer plus the right ACTION_KEY constant on the server side. vitest 138/138, `yarn compile:fast` clean.
This commit is contained in:
@@ -526,4 +526,5 @@ export class OutgoingHeader
|
||||
// Housekeeping (in-client admin panel) — IDs 9100..9199 reserved
|
||||
public static HOUSEKEEPING_FIND_USER_BY_NAME = 9100;
|
||||
public static HOUSEKEEPING_FIND_USER_BY_ID = 9101;
|
||||
public static HOUSEKEEPING_BAN_USER = 9102;
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class HousekeepingBanUserComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingBanUserComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof HousekeepingBanUserComposer>;
|
||||
|
||||
constructor(userId: number, reason: string, hours: number)
|
||||
{
|
||||
this._data = [userId, reason, hours];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from './HousekeepingBanUserComposer';
|
||||
export * from './HousekeepingFindUserByIdComposer';
|
||||
export * from './HousekeepingFindUserByNameComposer';
|
||||
|
||||
Reference in New Issue
Block a user