Webatrice: Add all ModeratorCommands (#5049)

* Move viewLogHistory to Moderator commands

* Add Moderator.banFromServer

* Add Moderator.getBanHistory

* Add Moderator.getWarnHistory

* Add Moderator.warnUser

* Add Moderator.getWarnList
This commit is contained in:
Zach H 2024-06-12 22:15:14 -04:00 committed by GitHub
parent ce8092318e
commit e45c4042fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 217 additions and 943 deletions

View file

@ -1,7 +1,28 @@
import { SessionCommands } from 'websocket';
import { ModeratorCommands } from 'websocket';
export default class ModeratorService {
static banFromServer(minutes: number, userName?: string, address?: string, reason?: string,
visibleReason?: string, clientid?: string, removeMessages?: number): void {
ModeratorCommands.banFromServer(minutes, userName, address, reason, visibleReason, clientid, removeMessages);
}
static getBanHistory(userName: string): void {
ModeratorCommands.getBanHistory(userName);
}
static getWarnHistory(userName: string): void {
ModeratorCommands.getWarnHistory(userName);
}
static getWarnList(modName: string, userName: string, userClientid: string): void {
ModeratorCommands.getWarnList(modName, userName, userClientid);
}
static viewLogHistory(filters): void {
SessionCommands.viewLogHistory(filters);
ModeratorCommands.viewLogHistory(filters);
}
static warnUser(userName: string, reason: string, clientid?: string, removeMessage?: boolean): void {
ModeratorCommands.warnUser(userName, reason, clientid, removeMessage);
}
}