Cockatrice/webclient/src/websocket/persistence/ModeratorPersistence.ts
2026-04-14 11:34:29 -05:00

44 lines
1.3 KiB
TypeScript

import { ServerDispatch } from 'store';
import { BanHistoryItem, LogItem, WarnHistoryItem, WarnListItem } from 'types';
export class ModeratorPersistence {
static banFromServer(userName: string): void {
ServerDispatch.banFromServer(userName);
}
static banHistory(userName: string, banHistory: BanHistoryItem[]): void {
ServerDispatch.banHistory(userName, banHistory);
}
static viewLogs(logs: LogItem[]): void {
ServerDispatch.viewLogs(logs);
}
static warnHistory(userName: string, warnHistory: WarnHistoryItem[]): void {
ServerDispatch.warnHistory(userName, warnHistory);
}
static warnListOptions(warnList: WarnListItem[]): void {
ServerDispatch.warnListOptions(warnList);
}
static warnUser(userName: string): void {
ServerDispatch.warnUser(userName);
}
static grantReplayAccess(replayId: number, moderatorName: string): void {
ServerDispatch.grantReplayAccess(replayId, moderatorName);
}
static forceActivateUser(usernameToActivate: string, moderatorName: string): void {
ServerDispatch.forceActivateUser(usernameToActivate, moderatorName);
}
static getAdminNotes(userName: string, notes: string): void {
ServerDispatch.getAdminNotes(userName, notes);
}
static updateAdminNotes(userName: string, notes: string): void {
ServerDispatch.updateAdminNotes(userName, notes);
}
}