import { Connection } from '../../../skychat/Connection.js'; import { RoomManager } from '../../../skychat/RoomManager.js'; import { GlobalPlugin } from '../../GlobalPlugin.js'; declare enum BAN_TYPES { ACCESS = 0, SHADOW = 1, LAG = 2, SPAM = 3 } export declare class BanPlugin extends GlobalPlugin { static readonly TICK_INTERVAL = 1000; static readonly BAN_COMMAND: string; static readonly UNBAN_COMMAND: string; static readonly BANLIST_COMMAND: string; static readonly commandName: string; static readonly commandAliases: string[]; readonly minRight: number; readonly opOnly: boolean; readonly rules: { [x: string]: { minCount: number; maxCount: number; params: { name: string; pattern: RegExp; }[]; } | { minCount: number; maxCount: number; params?: undefined; }; }; /** * List of banned ips */ protected storage: { banned: { [matchString: string]: { source: string; type: BAN_TYPES; until: number | null; }; }; }; constructor(manager: RoomManager); run(alias: string, param: string, connection: Connection): Promise; isBanned(connection: Connection, type?: BAN_TYPES): boolean; handleBan(param: string, connection: Connection): Promise; handleUnban(param: string, connection: Connection): Promise; handleBanList(param: string, connection: Connection): Promise; onNewMessageHook(message: string, connection: Connection): Promise; onNewConnection(connection: Connection): Promise; onConnectionJoinedRoom(connection: Connection): Promise; private tick; } export {};