{"id":24642736,"url":"https://github.com/zartek-creole/atcl","last_synced_at":"2026-01-04T00:44:03.768Z","repository":{"id":267695136,"uuid":"902072546","full_name":"ZarTek-Creole/ATcl","owner":"ZarTek-Creole","description":"A TCL script for Eggdrop bots enabling the execution of TCL commands directly from IRC. It includes access control for users, command restrictions, precise execution timing, and detailed logging for secure and efficient bot management.","archived":false,"fork":false,"pushed_at":"2024-12-11T23:42:55.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-19T12:43:31.457Z","etag":null,"topics":["bot-development","eggdrop","exec","script","tcl"],"latest_commit_sha":null,"homepage":"","language":"Tcl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZarTek-Creole.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-11T21:15:39.000Z","updated_at":"2024-12-11T23:42:58.000Z","dependencies_parsed_at":"2024-12-11T22:36:04.580Z","dependency_job_id":null,"html_url":"https://github.com/ZarTek-Creole/ATcl","commit_stats":null,"previous_names":["zartek-creole/atcl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZarTek-Creole%2FATcl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZarTek-Creole%2FATcl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZarTek-Creole%2FATcl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZarTek-Creole%2FATcl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZarTek-Creole","download_url":"https://codeload.github.com/ZarTek-Creole/ATcl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244619676,"owners_count":20482458,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot-development","eggdrop","exec","script","tcl"],"created_at":"2025-01-25T13:12:37.347Z","updated_at":"2026-01-04T00:44:03.742Z","avatar_url":"https://github.com/ZarTek-Creole.png","language":"Tcl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aTCL Script\n\n\n|  |  |\n| --- | --- |\n| ![aTCL Logo](https://s3.amazonaws.com/i.snag.gy/M62ldk.jpg) | ![aTCL Logo](https://dummyimage.com/600x200/918191/1e28b3\u0026text=ATcl+Script) |\n\naTCL Script is a **TCL module** for **Eggdrop bots**, enabling secure execution of TCL commands directly from IRC. It includes access control, command validation, logging, and precise execution timing for enhanced usability and security.\n---\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/ZarTek-Creole/ATcl)\n![GitHub issues](https://img.shields.io/github/issues/ZarTek-Creole/ATcl)\n![GitHub license](https://img.shields.io/github/license/ZarTek-Creole/ATcl)\n![GitHub stars](https://img.shields.io/github/stars/ZarTek-Creole/ATcl)\n![GitHub forks](https://img.shields.io/github/forks/ZarTek-Creole/ATcl)\n![GitHub contributors](https://img.shields.io/github/contributors/ZarTek-Creole/ATcl)\n![GitHub last commit](https://img.shields.io/github/last-commit/ZarTek-Creole/ATcl)\n\n---\n\n## Table of Contents\n\n1. [Features](#features)\n2. [Getting Started](#getting-started)\n   - [Installation](#installation)\n3. [Usage Examples](#usage-examples)\n   - [Basic Command Execution](#1-basic-command-execution)\n   - [Access Denied for Unauthorized Users](#2-access-denied-for-unauthorized-users)\n   - [Error Handling](#3-error-handling)\n   - [Multi-Line Results](#4-multi-line-results)\n   - [Restricted Commands](#5-restricted-commands)\n4. [Configuration](#configuration)\n   - [Variables](#variables)\n5. [Changelog](#changelog)\n6. [Evaluation](#evaluation)\n7. [Contributing](#contributing)\n8. [License](#license)\n9. [Contact](#contact)\n\n---\n\n## Features\n\n- **TCL command execution via IRC**:\n  - Execute TCL commands securely in real-time from IRC channels.\n  - Ideal for bot administrators and advanced bot customization.\n\n- **Access control**:\n  - Define a list of allowed users (bot owners).\n  - Restrict specific commands using a denylist for additional security.\n\n- **Detailed logging**:\n  - Logs all executed commands, including the user, arguments, and results.\n  - Includes error logs for debugging and tracking.\n\n- **Precise execution timing**:\n  - Tracks the execution time of commands with microsecond precision.\n  - Results are dynamically formatted for readability in microseconds (`µs`) or milliseconds (`ms`).\n\n- **Multi-line and dynamic outputs**:\n  - Handles and formats outputs spanning multiple lines for readability.\n\n---\n\n## Getting Started\n\n### Installation\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/ZarTek-Creole/ATcl.git\n   cd ATcl\n   ```\n\n2. **Add the script to your bot**:\n   - Copy the `atcl.tcl` script to your Eggdrop's script directory.\n   - Load the script in your bot's configuration file:\n     ```tcl\n     source scripts/atcl.tcl\n     ```\n\n3. **Configure the script**:\n   - Open `atcl.tcl` and modify the variables:\n     - `allowUsers`: Define who can execute commands.\n     - `deniedCommands`: Specify commands that are restricted.\n\n4. **Restart your bot**:\n   - Reload your Eggdrop bot to apply the changes and enable aTCL.\n\n---\n\n## Usage Examples\n\n### 1. **Basic Command Execution**\nFrom IRC, you can execute a basic TCL command:\n```plaintext\n\u003c~Owner\u003e atcl return \"Hello, World!\"\n\u003c@Bot\u003e Execution successful: Hello, World! - 0.5ms\n```\n\n### 2. **Access Denied for Unauthorized Users**\nUnauthorized users will receive a clear error message:\n```plaintext\n\u003c~RandomUser\u003e atcl expr {1 + 1}\n\u003c@Bot\u003e RandomUser access denied. Only allowed for the owner.\n```\n\n### 3. **Error Handling**\nIf an invalid command is executed, the error is returned:\n```plaintext\n\u003c~Owner\u003e atcl invalidCommand\n\u003c@Bot\u003e Execution failed: invalidCommand: command not found - 0.3ms\n```\n\n### 4. **Multi-Line Results**\nFor commands that return multi-line outputs:\n```plaintext\n\u003c~Owner\u003e atcl list a b c\n\u003c@Bot\u003e Execution successful: \n'\na\nb\nc\n'\n - 0.7ms\n```\n\n### 5. **Restricted Commands**\nIf a restricted command (from `deniedCommands`) is attempted:\n```plaintext\n\u003c~Owner\u003e atcl exec ls\n\u003c@Bot\u003e Access denied for command: exec\n```\n\n---\n\n## Configuration\n\nThe script allows easy customization via variables:\n\n### Variables\n\n- **`allowUsers`**:\n  Define the list of authorized users. Example:\n  ```tcl\n  variable allowUsers \"User1 Admin Owner\"\n  ```\n\n- **`deniedCommands`**:\n  Define the list of restricted commands. Example:\n  ```tcl\n  variable deniedCommands {exec fork eval}\n  ```\n\n- **`listCommands`**:\n  Define the IRC commands that trigger the script. Example:\n  ```tcl\n  variable listCommands \"atcl ${::botnick}tcl ${::nick}tcl\"\n  ```\n\n---\n\n## Changelog\n\n### Version 1.1\n- Enhanced readability with aligned variables and consistent formatting.\n- Added explicit type documentation for variables.\n- Converted docstrings to TCL-compatible comments.\n- Refactored multi-line handling for better output.\n- Modularized the code with namespaces and separated responsibilities.\n- Added `safeEval` for secure command execution with validation.\n- Enhanced execution time precision with microseconds support.\n- Introduced `formatExecutionTime` for dynamic time formatting.\n- Improved readability with aligned variables and clear comments.\n- Centralized error logging with `logError`.\n- Cleaned up multi-line responses and error messages.\n\n### Version 1.0\n- Initial release with basic command execution and logging.\n\n---\n\n## Evaluation\n\n| **Criteria**              | **Rating**   |\n|----------------------------|--------------|\n| Feature Completeness       | ⭐⭐⭐⭐⭐       |\n| Documentation Clarity      | ⭐⭐⭐⭐⭐       |\n| Code Readability           | ⭐⭐⭐⭐⭐       |\n| Ease of Configuration      | ⭐⭐⭐⭐⭐       |\n| Security Features          | ⭐⭐⭐⭐⭐       |\n| Error Handling             | ⭐⭐⭐⭐⭐       |\n\n---\n\n## Contributing\n\nContributions are welcome!  \nIf you'd like to contribute, please fork the repository and submit a pull request.  \n\nFor bug reports or feature requests, open an issue in the [GitHub Issues](https://github.com/ZarTek-Creole/ATcl/issues) section.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\n\n---\n\n## Contact\n\nFor support, feature requests, or feedback, contact **[ZarTek-Creole](https://github.com/ZarTek-Creole)** via GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzartek-creole%2Fatcl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzartek-creole%2Fatcl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzartek-creole%2Fatcl/lists"}