Description
# Ginviter
**Author:** Greenstone of Regulators with an Assist of Google AI
**Supported Clients:** World of Warcraft: Retail (`12.1.5` / `12.1.7`) & World of Warcraft: Forever (`16001`)
**Current Version:** `2.2.1`
**Ginviter** is a cross-client guild recruitment addon featuring a draggable minimap button with circular masking and live queue counter, whisper keyword detection with audio alerts, customizable pre-invite whispers, automated guild chat welcomes, and an unaccepted-invite log.
---
## Hybrid Client Workflows
### 1. World of Warcraft: Retail (`12.1.5` / `12.1.7`) — Direct Invites
* **Context Menu (`Ginvite`):** Right-click any player in chat, party/raid frames, target/focus frames, or communities and select **Ginvite** to send your pre-invite whisper and immediately invite them via `C_GuildInfo.Invite()`.
* **Whisper Keyword Auto-Invite:** When a player whispers your configured keyword (default: `ginvite`), **Ginviter** plays a sound alert, sends your pre-invite whisper, and invites them directly.
* **Encounter Secret-Value Safe:** Safely ignores Midnight (`12.x`) `<secret string>` chat/system payloads during instanced combat without throwing Lua errors.
### 2. World of Warcraft: Forever (`16001`) — Zero-Taint Pure-Data Queue
Because *WoW: Forever* blocks addons from calling `GuildInvite()` or pre-filling `/ginvite` in chat (`ADDON_ACTION_FORBIDDEN`), **Ginviter** uses a pure-data database (`GinviterDB.inviteQueue`) with zero protected API calls:
1. **Capture Requests:** When a player whispers your trigger word (e.g., `ginvite`) or you right-click a same-faction player and choose **Save to Ginvite Queue**, their name is saved to `GinviterDB.inviteQueue`, a sound alert plays, and the **Pending Invite Requests** window opens.
2. **Send Clean Invite:** Read the player's name in the queue window and type `/ginvite <PlayerName>` directly in your own untainted chat box.
3. **Log & Welcome:** Click **Invited** next to their name to send your pre-invite whisper and move them to the **Unaccepted Guild Invites Log**—or leave them in the queue, and **Ginviter** will automatically clear them and post your `/guild` welcome message as soon as they join.
---
## Features Overview
* **Draggable Circular Minimap Button:** Displays your custom doorway icon (`ginviter.tga`) clipped with WoW's circular `MaskTexture` (`TempPortraitAlphaMask`) directly on the minimap rim, complete with a live green counter badge for pending queue requests.
* **Left-Click:** Toggle the **Pending Invite Requests** window.
* **Right-Click:** Open **Ginviter Settings**.
* **Left-Drag:** Reposition smoothly around the minimap border.
* **Whisper Keyword Detection & Sound Alert:** Monitors `CHAT_MSG_WHISPER` for your customizable trigger word (ignoring case and punctuation) and plays an audio chime (`PlaySound`) when a new whisper request arrives.
* **Pre-Invite Whisper & Live Preview:** Automatically whispers prospective recruits before inviting them, supporting `{guild}` and `{player}` placeholders, with a **Preview Whisper** button to test formatting locally.
* **Automated Guild Chat Welcome:** Announces a customizable greeting in `/guild` chat when a new member accepts an invite.
* **Unaccepted Invites Log:** Tracks `Pending / Unaccepted`, `Declined`, `Declined (Auto-Block)`, and `Already in Guild` statuses and removes entries automatically once members appear on the guild roster.
---
## Slash Commands
All commands use `/ginviter`:
| Command | Description |
| :--- | :--- |
| `/ginviter` | Opens the **Ginviter** options panel (outside of combat). |
| `/ginviter queue` | Opens the **Pending Invite Requests** window. |
| `/ginviter add <PlayerName>` | Manually adds a player name to the invite queue. |
| `/ginviter minimap [on\|off]` | Shows or hides the minimap toggle button. |
| `/ginviter sound [on\|off\|test]` | Enables, disables, or tests the whisper request sound alert. |
| `/ginviter keyword <word\|on\|off>` | Sets or toggles the whisper trigger keyword (default: `ginvite`). |
| `/ginviter on` / `off` | Enables or disables **Ginvite** context menu options globally. |
| `/ginviter whisper <msg\|on\|off>` | Updates or toggles the pre-invite whisper message. |
| `/ginviter preview` | Prints a local preview of your formatted pre-invite whisper. |
| `/ginviter welcome <msg\|on\|off>` | Updates or toggles the `/guild` chat welcome message. |
| `/ginviter log` | Prints the unaccepted invites log to chat. |
| `/ginviter clear` | Clears all entries from the unaccepted invites log. |
---
## Installation
1. Create a folder named `ginviter` inside your World of Warcraft AddOns directory:
* **Retail:** `World of Warcraft\_retail_\Interface\AddOns\ginviter\`
* **WoW: Forever:** `World of Warcraft\_forever_\Interface\AddOns\ginviter\`
2. Place `ginviter.toc`, `ginviter.lua`, `ginviter.tga`, `ginviter.jpg`, `README.md`, and `CHANGELOG.md` inside that folder.
3. Fully restart the game client so the `.tga` minimap texture is indexed cleanly.


