# Eggdrop 1.0f Bot

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

## Description
Eggdrop is a fully-featured IRC bot written in C that provides extensive channel protection, user management, and automation capabilities.

## Key Features
- **Channel Protection**: Permanent ban lists with comments.
- **User Management**: User records saved on disk with customizable access flags.
- **Auto-learning**: Users can be automatically granted access by sending a /MSG to the bot.
- **Party Line**: A shared communication channel among multiple bots.
- **Botnet Support**: Supports linking and relaying between bots in a chain.
- **File System**: Manages file transfers and sharing among connected bots.

## File Analysis
- **chan.c** — Handles channel manipulation, user kickban, op, deop, and idle kicking.
- **chan.h** — Common definitions for `chan.c` and `mode.c`.
- **chanprog.c** — Manages server list, revenge punishment, timers, and Tcl script initialization.
- **chanset.c** — Handles low-level channel and chanset manipulation.
- **cmds.c** — Processes commands from users via DCC sockets.
- **cmdt.h** — Defines command types for built-in commands.
- **dcc.c** — Manages activity on DCC sockets, disconnects, and socket handling.
- **dccutil.c** — Handles formatted text sending to various connections, `.who`, `.whom`, and `.dccstat` commands.
- **eggdrop.h** — Compile-time settings for the bot.
- **english.h** — String definitions used in file operations.
- **filedb.c** — Manages filesystem database files and remote requests.
- **fileq.c** — Handles adding, removing, listing, sending, and canceling queued files.
- **files.c** — Manages all file system commands.
- **files.h** — Structures for the file database.
- **gotdcc.c** — Processes incoming CTCP DCCs (chat, send), outgoing dcc files, flood checking, and booting users from dcc chat.
- **hash.c** — Handles non-Tcl procedure lookups and Tcl bindings to commands.
- **hash.h** — Default bindings for 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.
- **mem.c** — Handles memory allocation and deallocation.
- **misc.c** — Provides utility functions for string operations, logging, queueing output, resync buffers, help system, motd display, and note system.
- **mode.c** — Queues and flushes mode changes made by the bot, handles channel mode changes, and sets/get current wanted channel modes.
- **msgcmds.c** — Handles all commands entered via /MSG.
- **msgnotice.c** — Manages messages and notices from users or channels, simple CTCP requests and replies.
- **net.c** — Handles raw network I/O.
- **proto.h** — Prototypes for functions used outside their own modules.
- **tandcmd.c** — Handles commands that come across the botnet, userfile transfer, and update commands from sharebots.
- **tandem.c** — Tracks bots in a chain, dumps lists of bots or bot trees to users, channel name associations, rejecting bots, linking/unlinking, and relaying to other bots.
- **tcl.c** — Manages Tcl commands added by the bot, Tcl initialization, and getting/setting Tcl/eggdrop variables.
- **tclegg.h** — Types for Tcl command bindings.
- **tclhash.c** — Handles bind and unbind, checking and triggering bindings, listing current bindings.
- **userrec.c** — Manages user records with functions to find and change them.
- **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, and reads the user file.
- **users.h** — Structures and definitions used by `users.c` and `userrec.c`.
- **dcc.save** — Script to save the entire user list for emergency purposes.
- **compat.tcl** — Implements compatibility with old versions of eggdrop.
- **console.tcl** — Saves and restores a user's console mode when they leave or return.
- **gainops1.tcl** — Sends and handles requests for ops from other 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 an HTML file showing people currently on a channel and their information.
- **samples.tcl** — Examples of extending eggdrop with Tcl.
- **toolkit.tcl** — Provides utility procedures for script packages.
- **README** — Instructions for compiling and using the bot.
- **CONTENTS** — List of files in the archive.
- **FEATURES** — Description of features provided by the bot.
- **Makefile** — Build instructions, not used directly.
- **Makefile.in** — Template for Makefile configuration.
- **UPDATES** — History of changes to the bot.
- **botchk** — Script to check if a bot is running and restart it if necessary.
- **compiling.FAQ** — FAQ on compiling the bot.
- **config.h.in** — Template for configuration header file.
- **configure** — Autoconf script for generating Makefiles.