mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-17 00:57:28 +01:00
* add ability to blacklist phrases in chat * support exact * support exact * i think this fixes the tgui thing * prettier linter eeeeeeeeeeee
36 lines
757 B
TypeScript
36 lines
757 B
TypeScript
/**
|
|
* @file
|
|
*/
|
|
import { createUuid } from 'tgui-core/uuid';
|
|
|
|
export const createHighlightSetting = (obj?: Record<string, any>) => ({
|
|
id: createUuid(),
|
|
highlightText: '',
|
|
highlightColor: '#ffdd44',
|
|
highlightWholeMessage: true,
|
|
matchWord: false,
|
|
matchCase: false,
|
|
...obj,
|
|
});
|
|
|
|
export const createDefaultHighlightSetting = (obj?: Record<string, any>) =>
|
|
createHighlightSetting({
|
|
id: 'default',
|
|
...obj,
|
|
});
|
|
|
|
export const createBlacklistSetting = (obj?: Record<string, any>) => ({
|
|
id: createUuid(),
|
|
blacklistText: '',
|
|
censor: false,
|
|
matchWord: false,
|
|
matchCase: false,
|
|
...obj,
|
|
});
|
|
|
|
export const createDefaultBlacklistSetting = (obj?: Record<string, any>) =>
|
|
createBlacklistSetting({
|
|
id: 'default',
|
|
...obj,
|
|
});
|