import { Connection } from '../../skychat/Connection.js'; import { RoomManager } from '../../skychat/RoomManager.js'; import { GlobalPlugin } from '../GlobalPlugin.js'; type NodeType = 'username' | 'ip'; type Node = { type: NodeType; value: string; count: number; lastRegistered: number; }; type StorageObject = { [stringifiedNode: string]: Array; }; export declare class TrackerPlugin extends GlobalPlugin { static readonly SOURCE_TYPES: NodeType[]; static readonly COUNT_INCREMENT_COOLDOWN_MS: number; static nodeToKey(type: NodeType, value: string): string; static readonly commandName = "track"; static readonly commandAliases: string[]; readonly minRight: number; readonly opOnly: boolean; readonly rules: { track: { minCount: number; maxCount: number; params: { name: string; pattern: RegExp; }[]; }; trackdelete: { minCount: number; maxCount: number; params: { name: string; pattern: RegExp; }[]; }; autotrack: { minCount: number; maxCount: number; params: { name: string; pattern: RegExp; }[]; }; }; protected storage: StorageObject; constructor(manager: RoomManager); getAllRelatedNodes(type: NodeType, value: string): Node[]; getAllRelatedNodesRecursive(type: NodeType, value: string, predicate?: (node: Node, path: Node[]) => boolean): { node: Node; path: Node[]; }[]; run(alias: string, param: string, connection: Connection): Promise; /** * Handle a track request * @param param * @param connection */ handleTrack(param: string, connection: Connection): Promise; /** * Handle a track request * @param param * @param connection */ handleTrackDelete(param: string, connection: Connection): Promise; /** * Handle a track request * @param param * @param connection */ handleAutoTrack(param: string, connection: Connection): Promise; inferTypeFromValue(value: string): NodeType | undefined; deleteAssociation(type1: NodeType, value1: string, type2: NodeType, value2: string): void; registerAssociation(type1: NodeType, value1: string, type2: NodeType, value2: string): void; executeNewConnectionHook(connection: Connection): Promise; } export {};