# Eggdrop 1.5.4 Bot

**Category:** Eggdrop_Bot
**Original Author:** Unknown

## Description
This is a version of the Eggdrop IRC bot software, designed to run unattended on an IRC network. It provides extensive automation capabilities and includes various modules for managing channels, users, and server interactions.

## Key Features
- **Channel Management**: Supports channel CTCP flood protection, channel join-part flood protection, and channel avalanche flood protection.
- **User Management**: Implements user-level permissions and access control.
- **Flood Protection**: Includes mechanisms to prevent large-scale floods from affecting the bot and channels it manages.
- **Scripting**: Uses Tcl for scripting commands and events.

## File Analysis
- **acconfig.h** — Template file used by autoheader when building config.h.in.
- **botcmd.c** — Handles commands that come across the botnet, userfile transfer, and update commands from sharebots.
- **botmsg.c** — Manages formatting of messages to be sent on the botnet and sends different messages to different versioned bots.
- **botnet.c** — Tracks which bots are connected where in the chain, dumps a list of bots or a bot tree to a user, and handles channel name associations.
- **chan.h** — Common header file for chan.c and mode.c, requiring users.h to be loaded as well.
- **chanprog.c** — Handles maintaining the server list, revenge punishment, timers, utimers, and initializing Tcl scripts.
- **cmdt.h** — Contains prototypes for built-in commands used outside their own module.
- **cmds.c** — Manages commands from a user via DCC, including no-irc commands.
- **compat.tcl** — Maps old Tcl functions to new ones for backward compatibility.
- **compat.h** — Wrap-around header for all compatibility functions.
- **dctutil.c** — Handles sending formatted text to varying types of connections and memory management for DCC structures.
- **dns.c** — Manages DNS resolve calls, provides code used by the bot if the DNS module is not loaded, and includes Tcl commands related to DNS.
- **eggdrop.h** — Contains compile-time settings for Eggdrop.
- **flags.c** — Handles flag matching and conversion functions.
- **flags.h** — Header file containing definitions for flags.
- **getops.tcl** — Script used for bots to request and give ops to each other, requiring a botnet setup.
- **klined.tcl** — Automatically removes the server from your bot's server list when it detects you've been k-lined by an operator.
- **match.c** — Provides wildcard matching functions.
- **misc.c** — Handles various utilities like split(), maskhost(), dumplots(), daysago(), logging, and help system.
- **modules.c** — Supports modules in Eggdrop.
- **net.c** — Manages all raw network I/O.
- **patch.h** — Header file for adding patches to Eggdrop's version string.
- **proto.h** — Prototypes for every function used outside its own module.
- **rfc1459.c** — Implements RFC 1459 compliant IRC protocol handling, with some deviations.
- **stat.h** — Contains definitions for file attributes.
- **tcl.c** — Handles Tcl commands added to Eggdrop and initializes Tcl.
- **tclegg.h** — Used by tcl.c and tclhash.c.
- **tclhash.c** — Manages bind/unbind, checking/triggering in-bot bindings, listing current bindings, adding/removing new binding tables, and procedure lookups for msg/dcc/file commands.
- **tclmisc.c** — Handles Tcl stubs for file system commands and other miscellaneous functions.
- **tcluser.c** — Manages Tcl stubs for user-record-oriented commands.
- **userent.c** — Handles user-entry handling in a new, more versatile style.
- **users.c** — Tests and enforces ignores, adds/removes ignores, lists ignores, auto-links bots, sends/receives a userfile from a bot, and performs whois/match operations.
- **users.h** — Structures and definitions used by users.c and userrec.c.