# Moon-Moon IRC Bot

**Category:** Standalone_Bot
**Original Author:** Charles Heywood

## Description
Moon-Moon is a standalone IRC bot written in Lua using the MoonScript syntax, with support for asynchronous programming through coroutines and cqueues. It connects to IRC servers, manages channels, and loads various modules to extend its functionality.

## Key Features
- **IRC Connection Handling**: Connects to specified IRC servers and handles authentication.
- **Channel Management**: Joins and leaves channels based on configuration.
- **Module System**: Loads and runs Lua modules for additional features.
- **Event Hooks**: Implements hooks for specific IRC events like JOIN, PART, and PRIVMSG.

## File Analysis
- **compile.sh** — Compiles MoonScript files into Lua bytecode using `moonc` and `luac`.
- **start.sh** — Runs the bot by compiling scripts and printing a logo.
- **LICENSE** — MIT License for software distribution.
- **README.md** — Documentation on dependencies, setup, and project information.
- **.gitignore** — Ignores specific files during version control.
- **irc.lua** — Core IRC connection logic using Lua and cqueues.
- **irc.moon** — MoonScript version of the core IRC connection logic.
- **logo** — ASCII art logo for the bot.
- **main.lua** — Main entry point that loads modules, connects to servers, and runs bots.
- **main.moon** — MoonScript version of the main entry point.
- **base.lua** — Base handlers and hooks for common IRC events like JOIN, PING, and ERROR.
- **base.moon** — MoonScript version of base handlers and hooks.
- **cap.lua** — Handles CAP (Client-to-Server Protocol) commands in IRC.
- **cap.moon** — MoonScript version of handling CAP commands.
- **data.lua** — Manages data structures for channels, users, and server capabilities.
- **data.moon** — MoonScript version of managing data structures.
- **output.lua** — Outputs formatted messages to the console based on IRC events.
- **output.moon** — MoonScript version of output handling.