# ip_hide.tcl

**Category:** Eggdrop_Bot
**Original Author:** KorTexx <vlad@ifrance.com>

## Description
This script automates the process of hiding an eggdrop bot's IP address by logging into Undernet's channel service and setting +x mode. It ensures that the bot's host is hidden before joining any channels.

## Key Features
- Automates login to Undernet's channel service using a specified username and password.
- Sets +x mode on the bot to hide its IP address.
- Joins channels after hiding the bot's host.
- Implements retry logic for authentication in case of failure.

## File Analysis
- **ip_hide.tcl** — A Tcl script that automates the process of hiding an eggdrop bot's IP address by logging into Undernet's channel service and setting +x mode. It ensures that the bot's host is hidden before joining any channels.
  - **bind evnt - connect-server iphconn** — Binds a procedure to handle server connection events, preparing for hiding the bot's IP address.
  - **bind evnt - init-server iphinit** — Binds another procedure to handle initial server setup, initiating the login process and channel joining after authentication.
  - **proc iphconn {type} {}** — Handles server connection events by setting inactive channels and preparing for name changes.
  - **proc iphinit {type} {}** — Initializes the bot by setting +x mode and attempting to log in to Undernet's channel service. It also binds a procedure to handle successful authentication.
  - **proc iphlogged {mnick uhost hand text {dest ""}} {}** — Handles successful authentication, resets the bot's name, unbinds relevant procedures, and sets up channels.