# 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, and automate various channel operations such as kicking, banning, and op management. It supports multi-channel functionality and includes extensive scripting capabilities via Tcl.

## Key Features
- **Channel Protection:** Manages permanent bans with comments.
- **User Records:** Stores detailed information about users including passwords, hostmasks, and flags.
- **Access Levels:** Customizable access levels for users.
- **Party Line:** Sends text to local users only if it starts with a specific prefix.
- **Tcl Scripting:** Extensive support for custom commands and automations via Tcl scripts.

## File Analysis
- **chan.c** — Handles channel manipulation, user kicks, bans, and idle kicking.
- **chan.h** — Defines structures used in `chan.c`.
- **chanprog.c** — Manages server connections, revenge punishment, timers, and tcl script initialization.
- **chanset.c** — Manages low-level channel and chanset manipulation.
- **cmds.c** — Handles commands from users via DCC.
- **cmdt.h** — Defines command structures for built-in commands.
- **dcc.c** — Manages DCC socket activity, including disconnects.
- **dccutil.c** — Provides functions to send formatted text over various connections and manages DCC timeouts.
- **eggdrop.h** — Contains compile-time settings and defines features of the bot.
- **english.h** — Defines strings used for file operations and directory listings.
- **filedb.c** — Handles filesystem database manipulation and remote requests.
- **fileq.c** — Manages file queue, listing, sending, and cancelling queued files.
- **files.c** — Handles all file system commands.
- **files.h** — Defines structures for the file database.
- **gotdcc.c** — Processes incoming CTCP DCC (chat/send) requests and outgoing DCC files.
- **hash.c** — Manages procedure lookups and Tcl bindings.
- **hash.h** — Contains 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** — Provides various utility functions like string operations and logging.
- **mode.c** — Queues and flushes mode changes made by the bot.
- **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 specific to bots.
- **proc.c** — Manages process handling for accepting DCC connections, telnet links, and executing shell commands.
- **proto.h** — Prototypes for various functions used outside their own modules.
- **tandcmd.c** — Handles commands that come across the botnet and userfile transfer from sharebots.
- **tandem.c** — Keeps track of tandem bots in the chain and channel associations.
- **tcl.c** — Manages Tcl code, initialization, and variable handling for commands added to Tcl.
- **tclegg.h** — Defines types of commands used by `tcl.c` and `tclhash.c`.
- **tclhash.c** — Handles binding and unbinding, checking and triggering bindings, and listing current bindings.
- **thread.c** — Provides Linux threading support.
- **userrec.c** — Manages user records including bans and ignores.
- **users.c** — Tests and enforces bans and ignores, adds and removes them, lists them, and handles auto-linking bots.
- **dcc.save** — Script to save the entire user list to disk for safety.
- **compat.tcl** — Implements compatibility with old versions of Eggdrop.
- **console.tcl** — Saves and restores console mode when a user leaves or returns.
- **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** — Script to talk to an Eggdrop bot in DCC chat.
- **ques3.tcl** — Creates HTML files showing people currently on a channel, their user@hosts, who's an op, and who's idle.
- **samples.tcl** — Adds examples of extending Eggdrop with Tcl.
- **toolkit.tcl** — Provides useful Tcl procedures for script packages.