# Eggdrop 1.8.1rc1

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

## Description
Eggdrop is a versatile IRC bot designed for automated channel management, including joining channels, managing users, and handling flood protection. It supports various features such as user-level access control, file transfers (fserve), and XDCC services.

## Key Features
- **User-Level Access Control**: Manages different levels of bot access.
- **Channel Management**: Joins and manages multiple IRC channels.
- **Flood Protection**: Protects against flood attacks using sentinel.tcl.
- **File Transfer Services**: Supports fserve for file sharing.
- **XDCC Services**: Provides XDCC services for distributing files.

## File Analysis
- **bg.c** — Handles background process management, ensuring thread compatibility during forks.
- **bg.h** — Header file defining constants and structures used in bg.c.
- **botcmd.c** — Manages commands from the botnet, including userfile transfers and sharebot updates.
- **botmsg.c** — Formats messages for sending on the botnet and handles different message versions for various bots.
- **botnet.c** — Tracks connected bots, manages channel name associations, and performs pinging and leaf status checks.
- **chan.h** — Common header file used by chan.c and mode.c, requiring users.h to be loaded as well.
- **chanprog.c** — Manages server lists, revenge punishment, timers, utimers, and initializes Tcl scripts.
- **cmdt.h** — Header file for built-in commands in Eggdrop.
- **dcc.c** — Handles DCC socket activity and disconnects.
- **dccutil.c** — Provides functions to send formatted text over various connections, including .who, .whom, and .dccstat.
- **dns.c** — Manages DNS resolution calls and provides Tcl commands for DNS lookups.
- **eggdrop.h** — Contains compile-time settings for Eggdrop.
- **flags.c** — Handles flag matching and conversion functions.
- **flags.h** — Header file defining constants and structures used in flags.c.
- **language.c** — Supports language translations within the bot.
- **main.c** — Core event handling, signal management, command-line arguments, context debugging.
- **match.c** — Implements wildcard matching for hostmasks and CIDR addresses.
- **mem.c** — Manages memory allocation and deallocation, tracking memory usage.
- **misc.c** — Handles various utilities like split(), logging, queueing output, resync buffers, help system, and MOTD display.
- **modules.c** — Supports loading and managing modules within Eggdrop.
- **net.c** — Manages raw network I/O operations.
- **proto.h** — Prototypes for functions used outside their own module.
- **rfc1459.c** — Implements RFC 1459 protocol handling, with some deviations to accommodate carat and tilde characters in nicknames.
- **stat.h** — File attribute management.
- **tcl.c** — Handles Tcl commands added by Eggdrop, including initialization and variable manipulation.
- **tclegg.h** — Header file used by tcl.c and tclhash.c for binding and unbinding events.
- **tclmisc.c** — Provides Tcl stubs for various non-Tcl commands.
- **tcluser.c** — Manages user-record-oriented Tcl commands.
- **tls.c** — Supports TLS encryption, certificate handling, and OpenSSL initialization.
- **userent.c** — Handles new-style user entry management.
- **userrec.c** — Manages user records, including flags and changes.
- **users.c** — Manages user ignores, userfile transfers, and channel-specific user flags.
- **users.h** — Structures and definitions used by users.c and userrec.c.