# Eggdrop 1.0n Bot

**Category:** Eggdrop_Bot
**Original Author:** Robey Pointer

## Description
Eggdrop is a robust IRC bot designed to protect channels from various threats, manage user access, and automate channel operations such as kicking, banning, and op management.

## Key Features
- **Channel Protection**: Permanent ban list storage with comments.
- **User Management**: User records saved on disk, including passwords, hostmasks, and access flags.
- **Automatic Learning**: Users can be automatically granted access by sending a message to the bot.
- **Command Automation**: Automates commands like JOIN, KICK, and OP based on user actions or configurations.
- **File Transfer Services**: Supports file serving (fserve) and XDCC services.

## File Analysis
- **bf_tab.h** — Blowfish P-box and S-box tables for encryption.
- **blowfish.c** — Handles encryption and decryption of passwords using the Blowfish algorithm.
- **botcmd.c** — Manages commands that come across the botnet, including userfile transfer and update commands from sharebots.
- **botnet.c** — Tracks connected bots in a chain, manages channel name associations, and handles pinging and relaying between bots.
- **chan.c** — Handles almost everything related to channel manipulation, including telling channel status, who responses, and idle kicking.
- **chan.h** — Defines structures and constants used for channel management.
- **chanprog.c** — Manages server lists, revenge punishment, timers, and initialization of Tcl scripts.
- **chanset.c** — Handles low-level channel and chanset manipulation.
- **cmds.c** — Processes commands from users via DCC connections.
- **cmdt.h** — Defines command structures for built-in commands.
- **dcc.c** — Manages activity on DCC sockets, including disconnects.
- **dccutil.c** — Handles sending formatted text to various types of connections and memory management for DCC structures.
- **eggdrop.h** — Contains compile-time settings and defines features of the bot.
- **english.h** — Defines strings used in the bot's output.
- **filedb.c** — Manages low-level manipulation of filesystem database files and reactions to remote file requests.
- **fileq.c** — Handles adding, removing, listing, sending, and cancelling queued files for users.
- **files.c** — Manages all file system commands.
- **files.h** — Defines structures used in the file system management.
- **gotdcc.c** — Processes incoming CTCP DCC requests, outgoing dcc files, flood checking, and booting from dcc chat.
- **hash.c** — Handles non-Tcl procedure lookups for msg/DCC/file commands and Tcl bindings to these commands.
- **hash.h** — Default bindings loaded into the Tcl hash-tables.
- **main.c** — Manages nickname changes, flood detection, signal handling, command line arguments, server connection, and interpreting server responses.
- **match.c** — Implements wildcard matching functions for pattern recognition.
- **mem.c** — Manages memory allocation and deallocation.
- **misc.c** — Handles various utilities like stristr(), split(), maskhost(), copyfile(), movefile(), fixfrom(), logging, output queueing, resync buffers, help system, and MOTD display.
- **mode.c** — Queues and flushes mode changes made by the bot, handles channel mode changes, and sets/get current wanted channel modes.
- **msgcmds.c** — Manages commands entered via /MSG.
- **msgnotice.c** — Handles messages and notices from users or channels, including simple CTCP requests and replies.
- **net.c** — Manages all raw network I/O.
- **notes.c** — Reads and sends notes, kills old notes, and changes destinations.
- **proto.h** — Contains function prototypes used outside their own modules.
- **tandem.h** — Tracks tandem-bots in the chain and channel associations.
- **tcl.c** — Manages Tcl commands added to the bot, Tcl initialization, and variable handling.
- **tclchan.c** — Handles Tcl stubs for channel-oriented commands.
- **tcldcc.c** — Handles Tcl stubs for DCC commands.
- **tclegg.h** — Defines types of commands used in Tcl bindings.
- **tclhash.c** — Manages bind and unbind, checking and triggering bindings, and listing current bindings.
- **tclmisc.c** — Handles file system command stubs and other miscellaneous Tcl functions.
- **tcluser.c** — Handles user-record-oriented commands.
- **userrec.c** — Contains functions to find and change user records.
- **users.c** — Manages testing, enforcing bans and ignores, adding/removing bans/ignores, listing bans/ignores, auto-linking bots, sending/receiving userfiles, and .whois/.match operations.
- **users.h** — Defines structures used by users.c and userrec.c.
- **dcc.save** — Script to save the bot's entire user list when exiting.
- **compat.tcl** — Implements old '+friend' commands for compatibility with older versions of Eggdrop.
- **console.tcl** — Saves a user's console mode on exit and restores it on reconnection.
- **dike.tcl** — Detects floodnets by comparing recent messages.
- **gainops1.tcl** — Sends and handles requests for ops from other tandem bots on the same channel.
- **local.tcl** — Intercepts text starting with ' and sends it to local users only.
- **ntalk.irc** — Allows talking to an Eggdrop bot in DCC chat.
- **ques3.tcl** — Creates HTML files showing current channel status.
- **samples.tcl** — Demonstrates extending Eggdrop with Tcl scripts.
- **toolbox.tcl** — Provides useful procedures for other scripts.
- **toolkit.tcl** — Contains additional Tcl procedures.
- **wire.tcl** — Manages secure communications on a botnet.
- **README** — Instructions for compiling and using the bot.
- **COPYING** — GNU General Public License.
- **FEATURES** — List of features provided by Eggdrop.
- **Makefile** — Build instructions.