# Eggdrop 1.0l 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. It includes comprehensive channel protection features, user record management, and automation for various IRC commands.

## Key Features
- **Channel Protection**: Permanent ban lists with comments.
- **User Record Management**: Passwords, hostmasks, flags, and automatic learning of new users.
- **Access Control**: User levels (e.g., op, master).
- **Command Automation**: Text, join, kick, and op automation.
- **File Services**: File serving capabilities.
- **XDCC Services**: XDCC distribution 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 from users via DCC chat, including user file transfer and update commands.
- **botnet.c** — Tracks bot connections in a chain, manages channel name associations, and handles pinging bots.
- **chan.c** — Handles almost everything related to channel manipulation, including telling channel status and managing bans.
- **chan.h** — Defines structures for channels and associated flags.
- **chanprog.c** — Manages server lists, revenge punishment, timers, and Tcl script initialization.
- **chanset.c** — Manages low-level channel and chanset manipulations.
- **cmds.c** — Handles commands from users via DCC sockets.
- **cmdt.h** — Defines command structures for built-in commands.
- **dcc.c** — Manages activity on DCC sockets, including disconnects.
- **dccutil.c** — Sends formatted text to connections and manages DCC timeouts.
- **eggdrop.h** — Compile-time settings for the bot.
- **english.h** — Contains various strings used in file operations.
- **filedb.c** — Manages filesystem database files and handles remote requests for files.
- **fileq.c** — Adds, removes, lists, sends, and cancels queued files.
- **files.c** — Handles all file system commands.
- **files.h** — Structures for the file database (per directory).
- **gotdcc.c** — Processes incoming CTCP DCC requests and outgoing dcc files.
- **hash.c** — Manages procedure lookups and bindings to msg/dcc/file commands.
- **hash.h** — Default bindings for Tcl hash-tables.
- **main.c** — Handles changing nicknames, flood detection, signal handling, telnet code translation, command line arguments, connecting to servers, and interpreting server responses.
- **match.c** — Implements wildcard matching functions.
- **mem.c** — Manages memory allocation and deallocation.
- **misc.c** — Handles various utility functions like stristr(), split(), maskhost(), copyfile(), movefile(), fixfrom(), dumplots(), daysago(), days(), daysdur().
- **mode.c** — Queues, flushes mode changes made by the bot, handles channel mode changes and reactions to them.
- **msgcmds.c** — Handles all commands entered via /MSG.
- **msgnotice.c** — Manages msgs and notices from users or channels, including simple CTCP requests and replies.
- **net.c** — Handles raw network I/O.
- **notes.c** — Reads and sends notes, kills old notes, and changes destinations.
- **proto.h** — Prototypes for functions used outside their own modules.
- **tandem.h** — Tracks tandem-bots in the chain, channel associations, and party-line members.
- **tcl.c** — Handles Tcl commands added to Eggdrop, Tcl initialization, and getting/setting Tcl variables.
- **tclchan.c** — Tcl stubs for channel-oriented commands.
- **tcldcc.c** — 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 commands and other miscellaneous Tcl functions.
- **tcluser.c** — Tcl stubs for user-record-oriented commands.
- **userrec.c** — Adds, deletes, converts strings to flags, and changes user records.
- **users.c** — Tests and enforces bans and ignores, adds/removes bans/ignores, lists bans/ignores, auto-links bots, sends/receives a userfile from another bot, lists users, and reads the user file.
- **users.h** — Structures and definitions used by users.c and userrec.c.
- **dcc.save** — Script to save and restore the 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 return.
- **dike.tcl** — Detects floodnets by checking recent messages.
- **gainops1.tcl** — Sends and handles requests for ops to other tandem bots on the same channel.
- **local.tcl** — Intercepts text starting with ' from party-line users, sends it only to local users.
- **ntalk.irc** — Script to talk to an Eggdrop bot in DCC chat.
- **ques3.tcl** — Creates HTML files showing current channel status periodically.
- **samples.tcl** — Examples of extending Eggdrop with Tcl.
- **toolbox.tcl** — Useful procedures for use in Tcl scripts.
- **toolkit.tcl** — Additional Tcl procedures for script packages.
- **wire.tcl** — Secondary encrypted communications on a botnet.
- **README** — General information about Eggdrop, including features and usage instructions.
- **CONTENTS** — Table of contents for documentation.
- **FEATURES** — Detailed list of features provided by Eggdrop.
- **Makefile** — Build configuration file.
- **Makefile.in** — Original Makefile template.