tiny-essentials
Version:
Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.
20 lines • 851 B
text/typescript
/**
* Verifies the IP address of a user socket for flooding attempts.
*
* This function checks how many times an IP has attempted to interact with the socket.
* If the attempts exceed a threshold, the IP is temporarily banned and disconnected.
*
* @param {Record<string, any>} socket - The socket object representing the connection.
* @param {Object} ioCache - The cache object that holds the blocklist and flood panel data.
* @param {Array<*>} ioCache.blocklick - The list of blocked IPs.
* @returns {void} This function does not return anything, it modifies the floodPanel and blocklist.
* @deprecated
*/
export default function verify(socket: Record<string, any>, ioCache: {
blocklick: Array<any>;
}): void;
export type FloodTimeout = Record<string, {
timeout: number;
tries: number;
}>;
//# sourceMappingURL=verify.d.mts.map