# empus/armour architecture

> Architecture diagram of the GitHub repository empus/armour, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/empus/armour
- Repository: https://github.com/empus/armour

## Overview

##### Main Project Type and Purpose
- Armour is a script for managing IRC channels and moderating abuse.
- It integrates with Eggdrop bots and manages diverse functionalities (commands, abuse handling, user management) through a modular, plugin-based approach.
- The README, sample configuration files (e.g., armour.conf.sample, eggdrop.conf.sample), and deployment scripts indicate an emphasis on both deployment configuration and runtime flexibility.

##### File Structure Insights
- Core Script:
- The file “armour.tcl” sits at the top level, which is likely the main execution script. It serves as the central coordinator.
- Configuration/Deployment:
- Configuration samples (for bot.conf, armour.conf, eggdrop.conf) provide defaults and instructions for deploying the bot on various IRC networks (like Undernet).
- The “deploy” folder contains configurations (e.g., dalnet.ini, undernet.ini) that specify network or deployment-specific parameters.
- Help Resources:
- The “help” directory encompasses numerous help files providing command-specific usage instructions (e.g., help/ban.help, help/op.help). These files support user commands and interactions.
- Plugins/Extensions:
- The “plugins” directory is populated with various Tcl scripts (e.g., aidle.tcl, email.tcl, openai.tcl) and even some PHP files (for incoming SMS processing). These plugins extend functionality by adding modular features like email alerts, push notifications, SMS handling, and even integration with OpenAI.
- Additional Utilities:
- The “packages” directory seems to contain additional modules, likely third-party libraries or reusable components that further extend capabilities such as HTTP processing or interfacing with external services.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Configuration Loader Subgraph
    subgraph "Configuration Loader"
        configArmour["armour.conf.sample"]:::config
        configBot["bot.conf.sample"]:::config
        configEggdrop["eggdrop.conf.sample"]:::config
        deployUndernet["deploy/undernet.ini"]:::config
        deployDalnet["deploy/dalnet.ini"]:::config
    end

    %% Core Engine Subgraph
    subgraph "Core Engine"
        CoreEngine["armour.tcl"]:::core
    end

    %% IRC Communication Module Subgraph
    subgraph "IRC Communication Module"
        IRCModule["IRC Gateway"]:::irc
    end

    %% Help System Subgraph
    subgraph "Help System"
        HelpSystem["Help Files"]:::help
    end

    %% Plugin Manager Subgraph
    subgraph "Plugin Manager"
        PluginManager["Plugins"]:::plugin
        pluginAidle["Aidle Plugin"]:::plugin
        pluginEmail["Email Plugin"]:::plugin
        pluginOpenai["OpenAI Plugin"]:::plugin
        pluginPush["Push Plugin"]:::plugin
        pluginQuote["Quote Plugin"]:::plugin
        pluginSMS["SMS Plugin"]:::plugin
        pluginTell["Tell Plugin"]:::plugin
        pluginTrakka["Trakka Extension"]:::plugin
    end

    %% Additional Utilities/Packages Subgraph
    subgraph "Additional Utilities"
        Packages["Packages"]:::pkg
        pkgGithub["GitHub Module"]:::pkg
        pkgHttp["HTTP Module"]:::pkg
        pkgLibdronebl["LibDroneBL Module"]:::pkg
    end

    %% Data Flow Connections
    configArmour --> CoreEngine
    configBot --> CoreEngine
    configEggdrop --> CoreEngine
    deployUndernet --> CoreEngine
    deployDalnet --> CoreEngine

    IRCModule --> CoreEngine
    CoreEngine --> HelpSystem
    CoreEngine --> PluginManager
    PluginManager --> CoreEngine

    PluginManager --> pluginAidle
    PluginManager --> pluginEmail
    PluginManager --> pluginOpenai
    PluginManager --> pluginPush
    PluginManager --> pluginQuote
    PluginManager --> pluginSMS
    PluginManager --> pluginTell
    PluginManager --> pluginTrakka

    pkgGithub --> Packages
    pkgHttp --> Packages
    pkgLibdronebl --> Packages
    Packages --> PluginManager

    %% Class Definitions for Color Styling
    classDef core fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
    classDef config fill:#ABEBC6,stroke:#1D8348,stroke-width:2px;
    classDef help fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef plugin fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
    classDef irc fill:#D2B4DE,stroke:#8E44AD,stroke-width:2px;
    classDef pkg fill:#FAD7A0,stroke:#D35400,stroke-width:2px;

    %% Click Events for Component Mappings
    click CoreEngine "https://github.com/empus/armour/blob/master/armour.tcl"
    click configArmour "https://github.com/empus/armour/blob/master/armour.conf.sample"
    click configBot "https://github.com/empus/armour/blob/master/bot.conf.sample"
    click configEggdrop "https://github.com/empus/armour/blob/master/eggdrop.conf.sample"
    click deployUndernet "https://github.com/empus/armour/blob/master/deploy/undernet.ini"
    click deployDalnet "https://github.com/empus/armour/blob/master/deploy/dalnet.ini"
    click HelpSystem "https://github.com/empus/armour/tree/master/help/"
    click PluginManager "https://github.com/empus/armour/tree/master/plugins/"
    click pluginAidle "https://github.com/empus/armour/blob/master/plugins/aidle.tcl"
    click pluginEmail "https://github.com/empus/armour/blob/master/plugins/email.tcl"
    click pluginOpenai "https://github.com/empus/armour/blob/master/plugins/openai.tcl"
    click pluginPush "https://github.com/empus/armour/blob/master/plugins/push.tcl"
    click pluginQuote "https://github.com/empus/armour/blob/master/plugins/quote.tcl"
    click pluginSMS "https://github.com/empus/armour/tree/master/plugins/sms/"
    click pluginTell "https://github.com/empus/armour/blob/master/plugins/tell.tcl"
    click pluginTrakka "https://github.com/empus/armour/tree/master/plugins/trakka"
    click IRCModule "https://github.com/empus/armour/blob/master/eggdrop.conf.sample"
    click Packages "https://github.com/empus/armour/tree/master/packages/"
    click pkgGithub "https://github.com/empus/armour/blob/master/packages/github.tcl"
    click pkgHttp "https://github.com/empus/armour/blob/master/packages/http.tcl"
    click pkgLibdronebl "https://github.com/empus/armour/blob/master/packages/libdronebl.tcl"
```
