# Eggdrop 1.0 Bot

**Category:** Eggdrop_Bot
**Original Author:** Robey Pointer (robey@acolyte.slip.netcom.com)

## Description
Eggdrop is a robust IRC bot designed to protect channels from takeovers, manage user access levels, and automate various channel operations such as bans, kicks, and ops.

## Key Features
- **Channel Protection**: Manages permanent ban lists with comments.
- **User Management**: Stores detailed user records including passwords, hostmasks, and flags.
- **Access Control**: Supports multiple user levels (e.g., op, voice).
- **Automated Actions**: Handles channel modes, joins, parts, and kicks based on predefined rules.
- **DCC File Transfer**: Manages file transfers via DCC connections.
- **Tcl Scripting**: Extensive support for custom Tcl scripts to extend functionality.

## File Analysis
- **chan.c** — Handles channel manipulation commands like bans, ops, and idle kicking.
- **chan.h** — Defines data structures used in `chan.c`.
- **chanprog.c** — Manages server lists, revenge punishments, and timers.
- **chanset.c** — Manages low-level channel settings and checks for expired channels.
- **cmds.c** — Handles commands received via DCC connections.
- **cmdt.h** — Defines command types used in `cmds.c`.
- **dcc.c** — Manages DCC socket activity, including disconnects and file transfers.
- **dccutil.c** — Provides utility functions for DCC operations.
- **eggdrop.h** — Contains compile-time settings and defines various macros.
- **english.h** — Defines strings used in the bot's output.
- **filedb.c** — Manages filesystem database files and handles remote requests.
- **fileq.c** — Handles file queue management, including adding, removing, and sending queued files.
- **files.c** — Implements all file system commands.
- **files.h** — Defines structures for the file database.
- **gotdcc.c** — Processes incoming CTCP DCC messages.
- **hash.c** — Manages procedure lookups for msg/dcc/file commands using Tcl bindings.
- **hash.h** — Default bindings to load into Tcl hash-tables.
- **main.c** — Handles nickname changes, flood detection, signal handling, and interpreting server responses.
- **match.c** — Implements wildcard matching functions.
- **mem.c** — Manages memory allocation and deallocation.
- **misc.c** — Contains various utility functions like `stristr()` and `split()`.
- **mode.c** — Queues and flushes mode changes made by the bot, handles channel modes, and reacts to them.
- **msgcmds.c** — Handles commands entered via `/MSG`.
- **msgnotice.c** — Manages messages and notices from users or channels, including simple CTCP requests and replies.
- **net.c** — Contains network functions for bots, especially for handling DCC connections and telnet links.
- **proc.c** — Handles process management, including accepting DCC connections, telnet to other bots, executing shell commands, etc.
- **proto.h** — Prototypes for various functions used outside their own modules.
- **tandcmd.c** — Manages commands that come across the botnet and userfile transfer commands from sharebots.
- **tandem.c** — Keeps track of tandem-bots in the chain, channel name associations, and pinging bots periodically.
- **tcl.c** — Handles Tcl command additions to Eggdrop, initialization, and variable handling.
- **tclegg.h** — Defines types for Tcl commands.
- **tclhash.c** — Manages bindings and triggers for various Tcl commands.
- **thread.c** — Provides Linux threading support.
- **userrec.c** — Implements functions to find and change user records.
- **users.c** — Handles testing, enforcing bans and ignores, adding and removing bans and ignores, listing bans and ignores, auto-linking bots, sending/receiving a userfile from a bot, and reading the user file.
- **users.h** — Defines structures and macros used in `users.c`.
- **dcc.save** — Used to save the entire user list to disk.
- **compat.tcl** — Implements compatibility with old versions of Eggdrop for commands like +op, -op, etc.
- **console.tcl** — Saves and restores console modes when users leave or return.
- **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 and sends it to local users only.
- **ntalk.irc** — A script for talking to an Eggdrop bot in DCC chat.
- **ques3.tcl** — Creates HTML files showing people on the channel, their user@hosts, who's an op, and who's idle.
- **samples.tcl** — Provides examples of extending Eggdrop with Tcl scripts.
- **README** — General documentation for Eggdrop.
- **FEATURES** — Lists features of Eggdrop.
- **Makefile** — Build instructions for the bot.
- **Makefile.in** — Template Makefile used by `configure`.
- **UPDATES** — Notes on updates to Eggdrop.
- **botchk** — A script to check if your bot is running and restart it if necessary.
- **config.h.in** — Configuration header template.
- **configure** — Autoconf-generated configuration script.
- **eggdrop.doc** — Documentation for Eggdrop.
- **eggstat** — A utility to dump statistics about the userfile.
- **lamestbot** — Sample configuration file for setting up a bot.