# ho_hammer.pl

**Category:** Irssi_Script
**Original Author:** Garion

## Description
This script monitors client connections to an IRC server for rapid reconnections (hammering) and can issue warnings or automatically kline (ban) the offending clients based on configurable settings.

## Key Features
- Tracks connection times from each host.
- Issues a warning if a host connects more than `ho_hammer_warning_count` times in `ho_hammer_warning_time` seconds.
- Klines a host for hammering after connecting more than `ho_hammer_violation_count` times within `ho_hammer_violation_time` seconds.
- Cleans up old connection data to prevent memory growth.

## File Analysis
- **ho_hammer.pl** — Main script file that implements the functionality described above. It includes event handling, warning and klining logic, and settings management.
- **ho_print_init_begin()** — Initializes logging and prints initial messages based on configuration settings.
- **event_serverevent()** — Handles server events to process client connections.
- **process_connect()** — Processes a new client connection by checking for rapid reconnections and issuing warnings or klines if necessary.
- **cleanup_conntimes_hash()** — Cleans up old connection data after a specified period.
- **cmd_hammer()** — Command handler for the `/hammer` command, providing help and status information.
- **print_help()** — Prints detailed help information about the script's settings and functionality.