# Eggdrop 1.0a Bot

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

## Description
Eggdrop is a full-featured IRC bot written in C, designed to protect channels from takeovers and manage user access levels through a complex command system. It supports various channel operations such as bans, kicks, and ops management.

## Key Features
- **Channel Protection:** Manages permanent ban lists with comments.
- **User Records:** Tracks users with passwords, hostmasks, and flags.
- **Access Levels:** Customizable via config file to grant different levels of access.
- **Party Line Management:** Handles messages from the party line and sends them only to local users.
- **Botnet Support:** Supports sharing user files across multiple bots in a network.
- **TCL Scripting:** Extensive support for TCL scripts to extend functionality.

## File Analysis
- **chan.c** — handles channel manipulation, status reporting, and user operations like kicking and banning.
- **chan.h** — defines structures used by chan.c.
- **chanprog.c** — manages server lists, revenge punishments, timers, and initialization of tcl scripts.
- **chanset.c** — deals with low-level channel and chanset manipulation.
- **cmds.c** — handles commands from users via DCC sockets.
- **cmdt.h** — defines command types used in TCL scripting.
- **dcc.c** — manages activity on DCC sockets, including disconnects.
- **dccutil.c** — provides functions for sending formatted text to various connections and managing timeouts.
- **eggdrop.h** — compile-time settings for the bot.
- **english.h** — contains string definitions used in file operations.
- **filedb.c** — handles low-level filesystem database manipulation.
- **fileq.c** — manages file queueing, listing, sending, and cancellation.
- **files.c** — handles all file system commands.
- **files.h** — defines structures for the file database.
- **gotdcc.c** — processes incoming CTCP DCC requests and outgoing dcc files.
- **hash.c** — handles non-Tcl procedure lookups and Tcl bindings.
- **hash.h** — default bindings to load into TCL hash-tables.
- **main.c** — main entry point for the bot, handling nick changes, flood detection, signal handling, and command line arguments.
- **match.c** — contains wildcard matching functions.
- **mem.c** — manages memory allocation and deallocation.
- **misc.c** — handles various utility functions like string operations and logging.
- **mode.c** — queues and flushes mode changes made by the bot.
- **msgcmds.c** — handles all commands entered via /MSG.
- **msgnotice.c** — processes messages and notices from users or channels, including simple CTCP requests and replies.
- **net.c** — handles raw network I/O.
- **proc.c** — manages process handling for the bot.
- **proto.h** — contains function prototypes used outside their own modules.
- **tandcmd.c** — handles commands that come across the botnet, userfile transfer, and update commands from sharebots.
- **tandem.c** — keeps track of connected bots in a chain, channel name associations, and pinging bots periodically.
- **tcl.c** — handles TCL commands added to the bot and TCL initialization.
- **tclegg.h** — defines types for TCL command handling.
- **tclhash.c** — binds and unbinds TCL commands, checks bindings, and lists current bindings.
- **userrec.c** — adds, deletes, and manipulates user records.
- **users.c** — tests and enforces bans and ignores, manages adding and removing them, and lists users.
- **users.h** — defines structures for user records.
- **dcc.save** — script to save the entire user list when the bot is about to crash.
- **compat.tcl** — implements old '+friend' commands for compatibility with older versions of Eggdrop.
- **console.tcl** — saves and restores a user's console mode on leaving or returning.
- **gainops1.tcl** — sends and handles requests for ops from other tandem bots on the same channel.
- **local.tcl** — intercepts party-line messages and sends them 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, ops status, and idle time.
- **samples.tcl** — examples of extending Eggdrop with TCL scripts.
- **README** — brief overview of the bot's features and usage instructions.
- **FEATURES** — detailed list of features supported by the bot.
- **Makefile** — build system for compiling the bot.
- **Makefile.in** — template for generating Makefiles.
- **UPDATES** — log of changes made to the bot.
- **botchk** — script to check if the bot is running and restart it if necessary.
- **config.h.in** — configuration header file used by autoconf.
- **configure** — GNU configure script for setting up the build environment.
- **eggdrop.doc** — documentation about Eggdrop, including setup instructions.
- **eggstat** — TCL script to dump statistics on user records.
- **lamestbot** — sample configuration file for setting up a bot.