# Sentinel Script

**Category:** BitchX_Script
**Original Author:** Unknown

## Description
This script is designed to monitor and manage flood attacks on an IRC channel by implementing various flood detection mechanisms, such as CTCP, MSG, TEXT, NICK, and JOIN-PART floods. It also includes functionality for logging and notifying administrators when a flood attack occurs.

## Key Features
- **Flood Detection:** Monitors CTCP, MSG, TEXT, NICK, and JOIN-PART floods.
- **Logging:** Logs flood events and notifies administrators via `sendnote`.
- **Channel Locking:** Temporarily locks channels to prevent further flooding.
- **Ignore Mechanism:** Ignores specific users or hosts during flood detection.

## File Analysis
- **filename** — ...
- **botnet-nick.tcl** — Contains the bot's nickname and other configuration settings.
- **sentinel.tcl** — Main script that implements various flood detection mechanisms, logging, and channel locking. It includes procedures for handling different types of floods (CTCP, MSG, TEXT, NICK, JOIN-PART).
- **validchan.tcl** — Checks if a given channel is valid.
- **isop.tcl** — Determines if a user has operator privileges on a channel.
- **matchattr.tcl** — Matches attributes for flood detection.
- **onchan.tcl** — Checks if the bot is on a specific channel.
- **validuser.tcl** — Validates user presence.
- **getchanhost.tcl** — Retrieves the channel host from a given nick and channel.
- **nick2hand.tcl** — Converts nick to hand for flood detection.