mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
parent
0994d10410
commit
c4bf9eb61c
61 changed files with 207 additions and 737 deletions
|
|
@ -6,10 +6,7 @@ export function banFromServer(minutes: number, userName?: string, address?: stri
|
|||
const command = webClient.protobuf.controller.Command_BanFromServer.create({
|
||||
minutes, userName, address, reason, visibleReason, clientid, removeMessages
|
||||
});
|
||||
|
||||
const sc = webClient.protobuf.controller.ModeratorCommand.create({
|
||||
'.Command_BanFromServer.ext': command
|
||||
});
|
||||
const sc = webClient.protobuf.controller.ModeratorCommand.create({ '.Command_BanFromServer.ext': command });
|
||||
|
||||
webClient.protobuf.sendModeratorCommand(sc, (raw) => {
|
||||
const { responseCode } = raw;
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ import { ModeratorPersistence } from '../../persistence';
|
|||
|
||||
export function getBanHistory(userName: string): void {
|
||||
const command = webClient.protobuf.controller.Command_GetBanHistory.create({ userName });
|
||||
|
||||
const sc = webClient.protobuf.controller.ModeratorCommand.create({
|
||||
'.Command_GetBanHistory.ext': command
|
||||
});
|
||||
const sc = webClient.protobuf.controller.ModeratorCommand.create({ '.Command_GetBanHistory.ext': command });
|
||||
|
||||
webClient.protobuf.sendModeratorCommand(sc, (raw) => {
|
||||
const { responseCode } = raw;
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ import { ModeratorPersistence } from '../../persistence';
|
|||
|
||||
export function getWarnHistory(userName: string): void {
|
||||
const command = webClient.protobuf.controller.Command_GetWarnHistory.create({ userName });
|
||||
|
||||
const sc = webClient.protobuf.controller.ModeratorCommand.create({
|
||||
'.Command_GetWarnHistory.ext': command
|
||||
});
|
||||
const sc = webClient.protobuf.controller.ModeratorCommand.create({ '.Command_GetWarnHistory.ext': command });
|
||||
|
||||
webClient.protobuf.sendModeratorCommand(sc, (raw) => {
|
||||
const { responseCode } = raw;
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ import { ModeratorPersistence } from '../../persistence';
|
|||
|
||||
export function getWarnList(modName: string, userName: string, userClientid: string): void {
|
||||
const command = webClient.protobuf.controller.Command_GetWarnList.create({ modName, userName, userClientid });
|
||||
|
||||
const sc = webClient.protobuf.controller.ModeratorCommand.create({
|
||||
'.Command_GetWarnList.ext': command
|
||||
});
|
||||
const sc = webClient.protobuf.controller.ModeratorCommand.create({ '.Command_GetWarnList.ext': command });
|
||||
|
||||
webClient.protobuf.sendModeratorCommand(sc, (raw) => {
|
||||
const { responseCode } = raw;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
import webClient from '../../WebClient';
|
||||
import { ModeratorPersistence } from '../../persistence';
|
||||
import { LogFilters } from 'types';
|
||||
|
||||
export function viewLogHistory(filters): void {
|
||||
export function viewLogHistory(filters: LogFilters): void {
|
||||
const command = webClient.protobuf.controller.Command_ViewLogHistory.create(filters);
|
||||
|
||||
const sc = webClient.protobuf.controller.ModeratorCommand.create({
|
||||
'.Command_ViewLogHistory.ext': command
|
||||
});
|
||||
const sc = webClient.protobuf.controller.ModeratorCommand.create({ '.Command_ViewLogHistory.ext': command });
|
||||
|
||||
webClient.protobuf.sendModeratorCommand(sc, (raw) => {
|
||||
const { responseCode } = raw;
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ import { ModeratorPersistence } from '../../persistence';
|
|||
|
||||
export function warnUser(userName: string, reason: string, clientid?: string, removeMessage?: boolean): void {
|
||||
const command = webClient.protobuf.controller.Command_BanFromServer.create({ userName, reason, clientid, removeMessage });
|
||||
|
||||
const sc = webClient.protobuf.controller.ModeratorCommand.create({
|
||||
'.Command_WarnUser.ext': command
|
||||
});
|
||||
const sc = webClient.protobuf.controller.ModeratorCommand.create({ '.Command_WarnUser.ext': command });
|
||||
|
||||
webClient.protobuf.sendModeratorCommand(sc, (raw) => {
|
||||
const { responseCode } = raw;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue