# Eggdrop 1.0j Bot

**Category:** Eggdrop_Bot
**Original Author:** Robey Pointer (Unknown)

## Description
Eggdrop is a full-featured IRC bot written in C, designed to protect channels from takeovers and manage user access via a complex configuration system.

## Key Features
- **Channel Protection**: Permanent ban lists with comments.
- **User Records**: Passwords, hostmasks, flags, and auto-learning of new users.
- **Access Control**: DCC chat commands for managing user flags.
- **Automated Actions**: Kicking and banning based on channel modes.
- **File Services**: File serving and XDCC services.

## File Analysis
- **bf_tab.h** — Blowfish P-box and S-box tables used for encryption.
- **blowfish.c** — Handles encryption and decryption of passwords using the Blowfish algorithm.
- **blowfish.h** — Defines constants and macros related to the Blowfish implementation.
- **chan.c** — Manages channel operations, including bans, kicks, and op management.
- **chan.h** — Channel-related data structures and definitions.
- **chanprog.c** — Handles initialization of channels and loading Tcl scripts.
- **chanset.c** — Low-level channel manipulation functions.
- **cmds.c** — Handles commands from users via DCC connections.
- **cmdt.h** — Command table for built-in commands.
- **dcc.c** — Manages DCC socket activity, including disconnects.
- **dccutil.c** — Utility functions for DCC operations and text formatting.
- **eggdrop.h** — Compile-time settings and configuration options.
- **english.h** — English language strings used in various parts of the bot.
- **filedb.c** — Handles low-level filesystem database manipulation.
- **fileq.c** — Manages file queueing, listing, and sending.
- **files.c** — Handles all file system commands.
- **files.h** — File database structure definitions.
- **gotdcc.c** — Processes incoming DCC requests and outgoing files.
- **hash.c** — Handles procedure lookups for msg/dcc/file commands.
- **main.c** — Main bot logic, including nickname changes, flood detection, and server interaction.
- **match.c** — Wildcard matching functions used in pattern recognition.
- **mem.c** — Memory allocation and tracking.
- **misc.c** — Various utility functions like string operations and logging.
- **mode.c** — Handles channel mode changes and reactions to them.
- **msgcmds.c** — Manages commands entered via /MSG.
- **msgnotice.c** — Handles messages and notices from users or channels, including simple CTCP requests.
- **net.c** — Raw network I/O handling.
- **notes.c** — Reading and sending notes between users.
- **proto.h** — Prototypes for functions used outside their own modules.
- **tandcmd.c** — Commands that come across the botnet and userfile transfer commands from sharebots.
- **tandem.c** — Tracks tandem bots in a chain, channel name associations, and party-line members.
- **tcl.c** — Tcl initialization and handling of commands added to Tcl.
- **tclchan.c** — Tcl stubs for channel-oriented commands.
- **tcldcc.c** — Tcl stubs for DCC commands.
- **tclegg.h** — Defines command types used in Tcl bindings.
- **tclhash.c** — Handles bind and unbind, checking and triggering bindings.
- **tclmisc.c** — Tcl stubs for file system and other commands.
- **tcluser.c** — Tcl stubs for user-record-oriented commands.
- **userrec.c** — Functions to find and change user records.
- **users.c** — Manages bans, ignores, and userfile operations.
- **users.h** — Structures and definitions used by users.c and userrec.c.
- **dcc.save** — Script to save the entire user list for crash recovery.
- **compat.tcl** — Compatibility script for old '+friend' commands.
- **console.tcl** — Saves and restores console modes when a user leaves or returns.
- **gainops1.tcl** — Sends and handles requests for ops between tandem bots on the same channel.
- **local.tcl** — Intercepts text starting with ' from party-line users, sends to local users only.
- **ntalk.irc** — Script to talk to an eggdrop bot in DCC chat.
- **ques3.tcl** — Creates HTML files showing people on a channel and their statuses.
- **samples.tcl** — Examples of extending Eggdrop with TCL scripts.
- **toolbox.tcl** — Useful procedures for use in TCL scripts.
- **toolkit.tcl** — Additional Tcl procedures for script packages.
- **README** — Instructions for compiling and using the bot.
- **CONTENTS** — Table of contents for documentation.
- **FEATURES** — List of features provided by Eggdrop.
- **Makefile** — Build instructions.
- **Makefile.in** — Configuration settings for building.
- **UPDATES** — List of changes in recent versions.
- **botchk** — Script to check if the bot is running and restart it if necessary.