# Eggdrop 1.0b Bot

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

## Description
Eggdrop is a multi-channel IRC bot written in C, designed to protect and manage channels by automatically handling bans, op management, and other administrative tasks.

## Key Features
- **Channel Protection**: Manages channel bans with comments and permanent storage.
- **User Records**: Stores user information including passwords, hostmasks, access flags, and more via DCC chat.
- **Learn Users**: Automatically grants access to new users who /MSG the bot "hello".
- **Party Line**: Intercepts and forwards text from party-line users to local users only.
- **Botnet Support**: Supports multiple bots on a channel with shared user files.
- **File System Integration**: Manages file transfers and sharing among bots.

## File Analysis
- **chan.c** — Handles channel manipulation, status reporting, and user actions like kicks and bans.
- **chan.h** — Defines structures for managing channels and their users.
- **chanprog.c** — Manages server lists, revenge punishments, timers, and Tcl script initialization.
- **chanset.c** — Manages low-level channel operations and checks expired channel stuff.
- **cmds.c** — Handles commands from users via DCC connections.
- **cmdt.h** — Defines command types for built-in commands.
- **dcc.c** — Manages activity on DCC sockets, 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 like Tcl support.
- **english.h** — Defines strings used in file operations and user interactions.
- **filedb.c** — Manages the filesystem database, handling remote requests for files.
- **fileq.c** — Manages adding and removing files to/from the file queue and listing them.
- **files.c** — Handles all file system commands.
- **files.h** — Defines structures for file database entries.
- **gotdcc.c** — Processes incoming DCC CTCP requests, outgoing dcc files, flood checking, and booting users from dcc chat.
- **hash.c** — Manages procedure lookups for msg/dcc/file commands and Tcl bindings.
- **hash.h** — Default bindings to load into the Tcl hash-tables.
- **main.c** — Handles changing nicknames, flood detection, signal handling, command line arguments, connecting to servers, and interpreting server responses.
- **match.c** — Provides wildcard matching functions for channel names and user input.
- **mem.c** — Manages memory allocation and deallocation.
- **misc.c** — Handles various utility functions like stristr(), split(), maskhost(), copyfile(), movefile(), fixfrom(), dumplots(), daysago().
- **mode.c** — Queues and flushes mode changes, handles channel mode changes, and sets/get current wanted channel modes.
- **msgcmds.c** — Manages all commands entered via /MSG.
- **msgnotice.c** — Handles msgs & notices from users or channels, simple ctcp requests and replies.
- **net.c** — Manages raw network I/O.
- **o_proc.c** — Handles process handling for eggdrop, including accepting dcc connections and executing system shell commands.
- **proto.h** — Contains function prototypes used outside their own modules.
- **tandcmd.c** — Manages commands that come across the botnet, userfile transfer and update commands from sharebots.
- **tandem.c** — Keeps track of which bots are connected in the chain and handles channel name associations on the party line.
- **tcl.c** — Handles Tcl commands added to eggdrop, Tcl initialization, and getting/setting Tcl/eggdrop variables.
- **tclegg.h** — Defines types for command handling.
- **tclhash.c** — Manages bindings and triggers for various commands.
- **userrec.c** — Manages user records including adding, removing, and checking bans and ignores.
- **users.c** — Handles testing and enforcing bans and ignores, adding/removing them, listing them, auto-linking bots, sending/receiving userfiles, and more.
- **users.h** — Defines structures for managing users.
- **dcc.save** — Saves the entire user list to disk periodically.
- **compat.tcl** — Implements old '+friend' commands for compatibility with older 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 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** — Allows talking to an eggdrop bot in dcc chat.
- **ques3.tcl** — Creates an HTML file showing people currently on a channel, their user@hosts, who's an op, and who's idle.
- **samples.tcl** — Adds example commands like bind/dcc commands and public commands for fun.
- **toolkit.tcl** — Provides useful Tcl procs for script packages.
- **README** — General documentation about eggdrop.
- **FEATURES** — List of features provided by eggdrop.
- **Makefile** — Build system configuration.
- **Makefile.in** — Template Makefile used to generate the actual Makefile.
- **UPDATES** — Notes on changes and updates for version 1.0b.
- **botchk** — Script to check if a bot is running and restart it if necessary.
- **config.h.in** — Configuration header file template.
- **configure** — GNU configure script used to generate Makefiles.
- **eggdrop.doc** — Documentation about eggdrop, not yet complete.
- **eggstat** — Utility to dump statistics on userfile.
- **lamestbot** — Sample configuration file for setting up a bot.