From c9a9b04fd714395f45a4b7c03feaacaf2653319a Mon Sep 17 00:00:00 2001 From: Lasse Nielsen Date: Sun, 1 Mar 2026 17:02:57 +0100 Subject: [PATCH 1/2] docs: add issue templates and PR template --- .github/ISSUE_TEMPLATE/bug-report.yml | 63 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature-request.yml | 35 ++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 36 +++++++++++++ 4 files changed, 135 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature-request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..cbf6ea4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,63 @@ +name: Bug Report +description: Report a bug with RaidLogAuto +title: "[Bug]: " +labels: + - bug +body: + - type: textarea + id: description + attributes: + label: Description + description: Clear description of the bug + validations: + required: true + - type: textarea + id: steps-to-reproduce + attributes: + label: Steps to Reproduce + description: Numbered steps to trigger the bug + placeholder: | + 1. Open the game + 2. Do something specific + 3. ... + validations: + required: true + - type: textarea + id: expected-behavior + attributes: + label: Expected Behavior + description: What should happen + validations: + required: true + - type: textarea + id: actual-behavior + attributes: + label: Actual Behavior + description: What actually happens (include errors) + validations: + required: true + - type: dropdown + id: wow-version + attributes: + label: WoW Version + description: Which version of World of Warcraft are you playing? + options: + - Retail + - TBC Anniversary + - MoP Classic + validations: + required: true + - type: input + id: raid-log-auto-version + attributes: + label: RaidLogAuto Version + description: 'Version number or "latest"' + validations: + required: false + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: Screenshots, error logs, addon list + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000..f4d0e9f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,35 @@ +name: Feature Request +description: Suggest a new feature or improvement for RaidLogAuto +title: "[Feature]: " +labels: + - enhancement +assignees: [] +body: + - type: textarea + id: problem-motivation + attributes: + label: Problem / Motivation + description: What problem does this solve? + validations: + required: true + - type: textarea + id: proposed-solution + attributes: + label: Proposed Solution + description: Describe the desired feature or API + validations: + required: true + - type: textarea + id: alternatives-considered + attributes: + label: Alternatives Considered + description: Other approaches you've considered + validations: + required: false + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: Examples, references, mockups + validations: + required: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..397dabc --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,36 @@ +## Description + + + +## Type of Change + + + +- [ ] Bug fix (non-breaking change that fixes an issue) +- [ ] New feature (non-breaking change that adds functionality) +- [ ] Refactor (non-breaking change that improves code quality) +- [ ] Documentation update +- [ ] Breaking change (fix or feature that would cause existing functionality to change) + +## Related Issues + + + +## Testing + + + +- [ ] Luacheck passes (`luacheck .`) +- [ ] Tested in-game manually +- [ ] WoW version(s) tested on: + +## Screenshots + + + +## Checklist + +- [ ] My code follows the project's code style (4-space indent, 120 char lines) +- [ ] I have tested my changes in-game +- [ ] Luacheck reports no warnings +- [ ] My commits follow [conventional commit](https://www.conventionalcommits.org/) format From a5f9af39a7c6f271621652bc9558cc2b3cc436fe Mon Sep 17 00:00:00 2001 From: Lasse Nielsen Date: Sun, 1 Mar 2026 17:03:50 +0100 Subject: [PATCH 2/2] feat(RaidLogAuto): add ACL auto-enable and CombatLog.txt reminder - Auto-enable Advanced Combat Logging when combat logging starts - Show StaticPopup dialog reminding users to delete CombatLog.txt - Dialog is set-and-forget: dismissed permanently on first acknowledgment - Add /rla acl command to check/enable ACL manually - Show ACL status in /rla status output - All 5 version files updated (Retail, Mists, Cata, TBC, Classic) --- .luacheckrc | 14 +- AGENTS.md | 290 +++++++++++++++++----------------------- RaidLogAuto_Cata.lua | 65 +++++++++ RaidLogAuto_Classic.lua | 65 +++++++++ RaidLogAuto_Mists.lua | 65 +++++++++ RaidLogAuto_Retail.lua | 65 +++++++++ RaidLogAuto_TBC.lua | 65 +++++++++ 7 files changed, 456 insertions(+), 173 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index a843e92..58b8c4d 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -16,18 +16,22 @@ globals = { "SLASH_RAIDLOGAUTO1", "SLASH_RAIDLOGAUTO2", "SlashCmdList", + "StaticPopupDialogs", } -- WoW API globals (read-only) read_globals = { + "C_ChallengeMode", + "C_Timer", + "COMBATLOGDISABLED", + "COMBATLOGENABLED", "CreateFrame", + "GetCVar", + "GetInstanceInfo", "IsInInstance", "IsInRaid", - "GetInstanceInfo", "LoggingCombat", - "C_Timer", - "C_ChallengeMode", - "COMBATLOGENABLED", - "COMBATLOGDISABLED", "print", + "SetCVar", + "StaticPopup_Show", } diff --git a/AGENTS.md b/AGENTS.md index 913886e..97cfa80 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,221 +1,175 @@ # RaidLogAuto - Agent Guidelines -This is a World of Warcraft addon that automatically enables combat logging when entering raid instances and disables it when leaving. The addon supports multiple WoW versions: Retail, MoP Classic, TBC Anniversary, Cataclysm Classic, and Classic Era. +World of Warcraft addon that automatically enables combat logging in raid instances and disables it on exit. Supports Retail, MoP Classic, TBC Anniversary, Cataclysm Classic, and Classic Era. ---- +## Build, Lint, and Release -## Build & Release Commands +There is no local build step. GitHub Actions handles everything: -### Packaging (using BigWigsMods/packager) -```bash -# No local build needed - GitHub Actions handles packaging -# On tag push, automatically packages for all versions via .github/workflows/release.yml -``` - -### Running a Single Test (Manual) -Since this is a WoW addon, there are no automated unit tests. Testing is done manually in-game: -1. Load the addon in the appropriate WoW version (Retail/Classic/TBC/Cata) -2. Enter/exit raid instances to verify combat logging toggles -3. Test slash commands: `/rla`, `/rla on`, `/rla off`, `/rla toggle`, `/rla mythic`, `/rla silent`, `/rla help` +- **Lint** (`.github/workflows/lint.yml`) - Runs `luacheck --no-color` on PRs to master via `nebularg/actions-luacheck`. +- **Release PR** (`.github/workflows/release-pr.yml`) - On master push, generates a changelog with git-cliff and opens/updates an `autorelease` PR. +- **Release** (`.github/workflows/release.yml`) - On tag push (or merged autorelease PR), packages with `BigWigsMods/packager@v2` and uploads to CurseForge, Wago, and GitHub. ---- +### Running Luacheck Locally -## Project Structure - -``` -RaidLogAuto/ -├── AGENTS.md # This file -├── RaidLogAuto.toc # TOC file - defines which Lua to load per version -├── RaidLogAuto_Retail.lua # Retail (Raids + Mythic+) -├── RaidLogAuto_Mists.lua # MoP Classic (Raids + Mythic+) -├── RaidLogAuto_TBC.lua # TBC Anniversary (Raids) -├── RaidLogAuto_Cata.lua # Cataclysm Classic (Raids) -├── RaidLogAuto_Classic.lua # Classic Era (Raids) -├── RaidLogAuto.lua # Deprecated - DO NOT EDIT -├── .luacheckrc # Luacheck configuration -├── .pkgmeta # Packaging metadata -├── .github/workflows/ -│ ├── lint.yml # Luacheck CI on PRs and master -│ └── release.yml # Release-please + auto-packaging +```bash +luacheck . ``` -### Version-Specific Files +Configuration is in `.luacheckrc` (Lua 5.1 std, no max line length, excludes deprecated `RaidLogAuto.lua`). -| File | Interface | Game Version | Features | -|------|-----------|--------------|----------| -| RaidLogAuto_Retail.lua | Interface | Retail | Raids + Mythic+ | -| RaidLogAuto_Mists.lua | Interface-Mists | MoP Classic | Raids + Mythic+ | -| RaidLogAuto_TBC.lua | Interface-BCC | TBC Anniversary | Raids | -| RaidLogAuto_Cata.lua | Interface-Cata | Cataclysm Classic | Raids | -| RaidLogAuto_Classic.lua | Interface-Classic | Classic Era | Raids | +### Manual Testing ---- +There are no automated tests. Test in-game: -## Code Style Guidelines +1. Load the addon in the target WoW version +2. Enter and exit a raid instance, verify combat logging toggles on/off +3. (Retail/MoP only) Start and finish a Mythic+ key with `/rla mythic` enabled +4. Test slash commands: `/rla`, `/rla on`, `/rla off`, `/rla toggle`, `/rla mythic`, `/rla silent`, `/rla help` +5. Check `/rla status` output matches expected SavedVariable state -### General Principles -- **Keep it simple** - This is a small addon (~200 lines), avoid over-engineering -- **Local scope everything** - Use `local` for all variables and functions -- **Cache API functions** - Cache frequently-used global API functions as locals for performance -- **One file per version** - Don't mix version-specific code; use separate files +#### Advanced Combat Logging Auto-Enable -### Lua Formatting +1. Disable ACL in WoW settings: `/console advancedCombatLogging 0` +2. Enter a raid instance - verify chat message: "Advanced Combat Logging was disabled. Automatically enabled it for you." +3. Verify ACL is now enabled: `/rla status` should show "Advanced Combat Logging: ON" +4. Enter another raid - verify NO duplicate ACL message (it is already on) -```lua --- Use 4 spaces for indentation (no tabs) --- Maximum line length: 120 characters --- Use spaces around operators: local x = 1 + 2 --- No trailing whitespace +#### CombatLog.txt Reminder Dialog --- Header comment format: - ------------------------------------------------------------------------------- - -- FileName - -- Description of what this file does - -- - -- Supported versions: Retail, MoP Classic (or relevant versions) - ------------------------------------------------------------------------------- +1. Reset the reminder: `/run RaidLogAutoDB.combatLogReminderDismissed = false; ReloadUI()` +2. Enter a raid instance - verify a StaticPopup dialog appears warning about CombatLog.txt +3. Click "OK, Got It" - verify dialog dismisses +4. Leave and re-enter the raid - verify the dialog does NOT reappear +5. `/reload` and re-enter - verify dialog still does NOT reappear (persisted) -local ADDON_NAME, _ = ... +#### /rla acl Command --- Constants (uppercase) -local CONSTANT_NAME = "value" +1. `/rla acl` with ACL enabled - shows "Advanced Combat Logging: ON" +2. `/console advancedCombatLogging 0` then `/rla acl` - should auto-enable and confirm --- Local references for performance (camelCase) -local IsInInstance = IsInInstance -local LoggingCombat = LoggingCombat +## Project Structure --- Color codes (defined once at top) -local COLOR_YELLOW = "|cffffff00" -local COLOR_GREEN = "|cff00ff00" -local COLOR_RED = "|cffff0000" -local COLOR_RESET = "|r" +``` +RaidLogAuto/ + RaidLogAuto.toc # TOC - maps Interface versions to Lua files + RaidLogAuto_Retail.lua # Retail (Raids + Mythic+) + RaidLogAuto_Mists.lua # MoP Classic (Raids + Mythic+) + RaidLogAuto_TBC.lua # TBC Anniversary (Raids only) + RaidLogAuto_Cata.lua # Cataclysm Classic (Raids only) + RaidLogAuto_Classic.lua # Classic Era (Raids only) + RaidLogAuto.lua # DEPRECATED - do not edit or load + .luacheckrc # Luacheck config + .pkgmeta # BigWigsMods packager metadata + cliff.toml # git-cliff changelog config + .github/workflows/ + lint.yml # Luacheck CI + release-pr.yml # Auto release PR via git-cliff + release.yml # Tag-based packaging and upload ``` -### Naming Conventions +Each game version loads exactly one Lua file via the TOC `Interface-*` directives. One file per version; never mix version-specific code across files. -| Type | Convention | Example | -|------|------------|---------| -| Files | PascalCase | RaidLogAuto_Retail.lua | -| Global variables | PascalCase | RaidLogAutoDB | -| Local variables | camelCase | local currentState | -| Functions | PascalCase | local function UpdateLogging() | -| Constants | UPPER_SNAKE | local DEFAULT_DELAY = 1 | -| Slash commands | UPPER_SNAKE | SLASH_RAIDLOGAUTO1 | +## Code Style -### Functions +### General Rules -```lua --- Prefer early returns -local function ShouldEnableLogging() - if not RaidLogAutoDB.enabled then - return false - end - - local inInstance, instanceType = IsInInstance() - if not inInstance then - return false - end - - -- Main logic - return instanceType == "raid" -end -``` +- Keep it simple. Each file is roughly 160-200 lines. Avoid over-engineering. +- Use `local` for all variables and functions. Only globals: `RaidLogAutoDB` (SavedVariable) and slash command registrations. +- Cache frequently-used WoW API globals as local references at the top of the file. +- Keep functions under 50 lines. Extract helpers when longer. +- Prefer early returns over deeply nested conditionals. +- Plain Lua 5.1; no type annotations, LuaLS, or EmmyLua comments. -### Event Handling +### File Layout (every version file follows this order) ```lua -local frame = CreateFrame("Frame") - -local function OnEvent(self, event, arg1) - if event == "ADDON_LOADED" and arg1 == ADDON_NAME then - -- Initialize and register other events - self:UnregisterEvent("ADDON_LOADED") - self:RegisterEvent("PLAYER_ENTERING_WORLD") - - elseif event == "PLAYER_ENTERING_WORLD" then - -- Handle event - end -end - -frame:SetScript("OnEvent", OnEvent) -frame:RegisterEvent("ADDON_LOADED") + ------------------------------------------------------------------------------- +-- FileName (without .lua) +-- Brief description. Version: . Features: + ------------------------------------------------------------------------------- +local ADDON_NAME, _ = ... +-- 1. SavedVariables init and defaults table +-- 2. Local API caching (IsInInstance, LoggingCombat, print) +-- 3. Localized strings table (L) +-- 4. Color constants (COLOR_YELLOW, COLOR_GREEN, COLOR_RED, COLOR_RESET) +-- 5. Helper functions (Print, ShouldEnableLogging, UpdateLogging) +-- 6. Event handler frame and OnEvent +-- 7. Slash command registration and handler ``` -### Version-Specific Code +### Naming Conventions + +| Element | Convention | Example | +|---------|------------|---------| +| Files | PascalCase with underscore suffix | `RaidLogAuto_Retail.lua` | +| Global variables | PascalCase | `RaidLogAutoDB` | +| Local variables | camelCase | `local shouldLog` | +| Local functions | PascalCase | `local function UpdateLogging()` | +| Constants | UPPER_SNAKE_CASE | `local COLOR_GREEN = ...` | +| Slash commands | UPPER_SNAKE_CASE | `SLASH_RAIDLOGAUTO1` | -**DO NOT** use runtime checks for version-specific features. Instead: +### Local API Caching -1. **Create separate files** for different versions -2. **Document supported versions** in the file header -3. **Remove unused code** - don't include Mythic+ code in files where it doesn't exist +Cache WoW globals used more than once, placed right after the defaults table: +`local IsInInstance = IsInInstance; local LoggingCombat = LoggingCombat; local print = print` -### Error Handling +### Localized Strings -- Use `pcall` for risky operations that might fail on some versions -- Provide fallback values for deprecated/removed globals -- Handle nil gracefully with defensive checks +Use a local `L` table with `or` fallbacks for globals that may not exist in all versions. `COMBATLOGENABLED`/`COMBATLOGDISABLED` were removed in Cataclysm, so always provide a fallback string. ```lua --- Safe API call with fallback -local currentlyLogging = LoggingCombat and LoggingCombat() or false - --- Defensive nil check -if RaidLogAutoDB and RaidLogAutoDB.printMessages then - -- Safe to use -end +local L = { + ENABLED = COMBATLOGENABLED or "Combat logging enabled.", + DISABLED = COMBATLOGDISABLED or "Combat logging disabled.", + ADDON_LOADED = "RaidLogAuto loaded. Type /rla for options.", +} ``` ### SavedVariables -```lua --- Initialize defaults in ADDON_LOADED handler -local defaults = { - enabled = true, - raidOnly = true, - mythicPlus = false, -- Retail/Mists only - printMessages = true, -} +Initialize `RaidLogAutoDB` with a defaults merge in the `ADDON_LOADED` handler to preserve existing user values while adding new keys. Only Retail and Mists files include `mythicPlus = false` in defaults. --- Merge defaults (preserves existing user values) +```lua +RaidLogAutoDB = RaidLogAutoDB or {} +local defaults = { enabled = true, raidOnly = true, printMessages = true } for key, value in pairs(defaults) do - if RaidLogAutoDB[key] == nil then - RaidLogAutoDB[key] = value - end + if RaidLogAutoDB[key] == nil then RaidLogAutoDB[key] = value end end ``` -### Slash Commands +### Event Handling -```lua -SLASH_RAIDLOGAUTO1 = "/raidlogauto" -SLASH_RAIDLOGAUTO2 = "/rla" +Register `ADDON_LOADED` first, then remaining events after initialization. Unregister `ADDON_LOADED` immediately after use. Use `C_Timer.After(1, UpdateLogging)` on `PLAYER_ENTERING_WORLD` to handle the race condition where instance info is not yet available. -SlashCmdList["RAIDLOGAUTO"] = function(msg) - local cmd = msg:lower():trim() - -- Handle commands -end -``` +### Error Handling + +- Guard API calls that may be nil: `if C_ChallengeMode and C_ChallengeMode.GetActiveChallengeMapID then` +- Use `or` fallbacks for globals that may not exist (see Localized Strings) +- No `pcall` is used; defensive nil checks are sufficient + +## Version-Specific Rules ---- +Do NOT use runtime version checks. The TOC routes each game version to the correct Lua file. If a feature only exists in certain versions (e.g. Mythic+), include the code only in those files. -## Common Pitfalls to Avoid +| Feature | Retail | Mists | TBC | Cata | Classic | +|---------|--------|-------|-----|------|---------| +| Raid logging | Yes | Yes | Yes | Yes | Yes | +| Mythic+ logging | Yes | Yes | No | No | No | +| CHALLENGE_MODE events | Yes | Yes | No | No | No | -1. **LoggingCombat API** - Available in all versions (modern client) -2. **C_ChallengeMode API** - API exists in all versions, but M+ content only in Retail/MoP Classic -3. **Deprecated globals** - `COMBATLOGENABLED`/`COMBATLOGDISABLED` removed in Cataclysm -4. **Race conditions** - Use C_Timer for delayed operations after PLAYER_ENTERING_WORLD -5. **Timer leaks** - Cancel pending timers before setting new ones -6. **Memory leaks** - Unregister events when no longer needed +## Common Pitfalls ---- +1. `COMBATLOGENABLED`/`COMBATLOGDISABLED` removed in Cata; always provide `or` fallbacks +2. `C_ChallengeMode` API exists in all clients but M+ only runs on Retail and MoP Classic +3. `PLAYER_ENTERING_WORLD` fires before instance info is ready; use `C_Timer.After` delay +4. Cancel or guard against redundant timers to avoid duplicate log toggles +5. Unregister events you no longer need (e.g. `ADDON_LOADED` after init) -## Key WoW API Functions Used +## Repository Constraints -| Function | Availability | Purpose | -|----------|--------------|---------| -| `IsInInstance()` | All versions | Check if player is in instance | -| `IsInRaid()` | All versions | Check if player is in raid | -| `LoggingCombat([bool])` | All versions | Get/set combat logging state | -| `C_ChallengeMode.GetActiveChallengeMapID()` | All versions (content in Retail/MoP only) | Get active M+ map ID | -| `C_Timer.After(seconds, func)` | All versions | Delayed function execution | -| `CreateFrame("Frame")` | All versions | Create event frame | +- No `.cursor/rules/`, `.cursorrules`, or `.github/copilot-instructions.md` files exist. All agent guidance lives in this file. +- Do not add new dependencies without discussing trade-offs first +- Do not edit `RaidLogAuto.lua`; it is deprecated and excluded from packaging +- Prefer ripgrep (`rg`) over `grep` when searching the codebase +- Keep changes minimal and focused; this is a small, stable addon diff --git a/RaidLogAuto_Cata.lua b/RaidLogAuto_Cata.lua index 1c4e951..227ddaf 100644 --- a/RaidLogAuto_Cata.lua +++ b/RaidLogAuto_Cata.lua @@ -15,11 +15,16 @@ local defaults = { enabled = true, raidOnly = true, printMessages = true, + combatLogReminderDismissed = false, } +local GetCVar = GetCVar local IsInInstance = IsInInstance local LoggingCombat = LoggingCombat local print = print +local SetCVar = SetCVar +local StaticPopupDialogs = StaticPopupDialogs +local StaticPopup_Show = StaticPopup_Show local L = { ENABLED = COMBATLOGENABLED or "Combat logging enabled.", @@ -30,6 +35,7 @@ local L = { local COLOR_YELLOW = "|cffffff00" local COLOR_GREEN = "|cff00ff00" local COLOR_RED = "|cffff0000" +local COLOR_WHITE = "|cffffffff" local COLOR_RESET = "|r" ------------------------------------------------------------------------------- @@ -56,6 +62,21 @@ local function ShouldEnableLogging() return instanceType == "raid" end +local function CheckAdvancedCombatLogging() + local acl = GetCVar("advancedCombatLogging") + if acl == nil then return end + if acl == "0" then + SetCVar("advancedCombatLogging", "1") + Print(COLOR_YELLOW .. "Advanced Combat Logging was disabled. " + .. COLOR_GREEN .. "Automatically enabled it for you.") + end +end + +local function ShowCombatLogReminder() + if RaidLogAutoDB.combatLogReminderDismissed then return end + StaticPopup_Show("RAIDLOGAUTO_COMBATLOG_REMINDER") +end + local function UpdateLogging() local shouldLog = ShouldEnableLogging() local currentlyLogging = LoggingCombat() @@ -63,6 +84,7 @@ local function UpdateLogging() if shouldLog and not currentlyLogging then LoggingCombat(true) Print(COLOR_GREEN .. L.ENABLED .. COLOR_RESET) + CheckAdvancedCombatLogging() elseif not shouldLog and currentlyLogging then LoggingCombat(false) Print(COLOR_RED .. L.DISABLED .. COLOR_RESET) @@ -75,6 +97,29 @@ end local frame = CreateFrame("Frame") +------------------------------------------------------------------------------- +-- Static Popup: CombatLog.txt Reminder +------------------------------------------------------------------------------- +StaticPopupDialogs["RAIDLOGAUTO_COMBATLOG_REMINDER"] = { + text = "RaidLogAuto:\n\n" + .. "1. Make sure Advanced Combat Logging is enabled in " + .. "System > Network > Advanced Combat Logging. " + .. "RaidLogAuto will enable it automatically when logging starts, " + .. "but the setting should stay on.\n\n" + .. "2. Delete your CombatLog.txt file (in WoW\\Logs\\) before each " + .. "raid session. Mixing old and new combat logs will cause " + .. "WarcraftLogs and WoWAnalyzer to reject the upload.\n\n" + .. "Click OK to dismiss this reminder permanently.", + button1 = "OK, Got It", + OnAccept = function() + RaidLogAutoDB.combatLogReminderDismissed = true + end, + timeout = 0, + whileDead = true, + hideOnEscape = false, + preferredIndex = 3, +} + local function OnEvent(self, event, arg1) if event == "ADDON_LOADED" and arg1 == ADDON_NAME then for key, value in pairs(defaults) do @@ -88,6 +133,8 @@ local function OnEvent(self, event, arg1) self:RegisterEvent("PLAYER_ENTERING_WORLD") self:RegisterEvent("ZONE_CHANGED_NEW_AREA") + C_Timer.After(3, ShowCombatLogReminder) + elseif event == "PLAYER_ENTERING_WORLD" then C_Timer.After(1, UpdateLogging) @@ -112,6 +159,11 @@ local function PrintStatus() print(" Raid Only: " .. (RaidLogAutoDB.raidOnly and "Yes" or "No")) print(" Print Messages: " .. (RaidLogAutoDB.printMessages and "Yes" or "No")) print(" Currently Logging: " .. (LoggingCombat() and COLOR_GREEN .. "Yes" or COLOR_RED .. "No") .. COLOR_RESET) + local acl = GetCVar("advancedCombatLogging") + if acl ~= nil then + Print("Advanced Combat Logging: " + .. (acl == "1" and (COLOR_GREEN .. "ON") or (COLOR_RED .. "OFF"))) + end end local function PrintHelp() @@ -121,6 +173,7 @@ local function PrintHelp() print(" /rla off - Disable addon") print(" /rla toggle - Toggle addon on/off") print(" /rla silent - Toggle chat messages") + Print(COLOR_GREEN .. "/rla acl" .. COLOR_WHITE .. " - Check/enable Advanced Combat Logging") print(" /rla help - Show this help") end @@ -149,6 +202,18 @@ SlashCmdList["RAIDLOGAUTO"] = function(msg) RaidLogAutoDB.printMessages = not RaidLogAutoDB.printMessages print(COLOR_YELLOW .. "[RaidLogAuto]|r Messages " .. (RaidLogAutoDB.printMessages and "enabled" or "disabled")) + elseif cmd == "acl" then + local acl = GetCVar("advancedCombatLogging") + if acl == nil then + Print(COLOR_RED .. "Advanced Combat Logging CVar not available.") + elseif acl == "1" then + Print("Advanced Combat Logging: " .. COLOR_GREEN .. "ON") + else + SetCVar("advancedCombatLogging", "1") + Print("Advanced Combat Logging was " .. COLOR_RED .. "OFF" + .. COLOR_WHITE .. ". " .. COLOR_GREEN .. "Enabled it for you.") + end + elseif cmd == "help" or cmd == "?" then PrintHelp() diff --git a/RaidLogAuto_Classic.lua b/RaidLogAuto_Classic.lua index 9ad271a..1d274cf 100644 --- a/RaidLogAuto_Classic.lua +++ b/RaidLogAuto_Classic.lua @@ -15,11 +15,16 @@ local defaults = { enabled = true, raidOnly = true, printMessages = true, + combatLogReminderDismissed = false, } +local GetCVar = GetCVar local IsInInstance = IsInInstance local LoggingCombat = LoggingCombat local print = print +local SetCVar = SetCVar +local StaticPopupDialogs = StaticPopupDialogs +local StaticPopup_Show = StaticPopup_Show local L = { ENABLED = COMBATLOGENABLED or "Combat logging enabled.", @@ -30,6 +35,7 @@ local L = { local COLOR_YELLOW = "|cffffff00" local COLOR_GREEN = "|cff00ff00" local COLOR_RED = "|cffff0000" +local COLOR_WHITE = "|cffffffff" local COLOR_RESET = "|r" ------------------------------------------------------------------------------- @@ -56,6 +62,21 @@ local function ShouldEnableLogging() return instanceType == "raid" end +local function CheckAdvancedCombatLogging() + local acl = GetCVar("advancedCombatLogging") + if acl == nil then return end + if acl == "0" then + SetCVar("advancedCombatLogging", "1") + Print(COLOR_YELLOW .. "Advanced Combat Logging was disabled. " + .. COLOR_GREEN .. "Automatically enabled it for you.") + end +end + +local function ShowCombatLogReminder() + if RaidLogAutoDB.combatLogReminderDismissed then return end + StaticPopup_Show("RAIDLOGAUTO_COMBATLOG_REMINDER") +end + local function UpdateLogging() local shouldLog = ShouldEnableLogging() local currentlyLogging = LoggingCombat() @@ -63,6 +84,7 @@ local function UpdateLogging() if shouldLog and not currentlyLogging then LoggingCombat(true) Print(COLOR_GREEN .. L.ENABLED .. COLOR_RESET) + CheckAdvancedCombatLogging() elseif not shouldLog and currentlyLogging then LoggingCombat(false) Print(COLOR_RED .. L.DISABLED .. COLOR_RESET) @@ -75,6 +97,29 @@ end local frame = CreateFrame("Frame") +------------------------------------------------------------------------------- +-- Static Popup: CombatLog.txt Reminder +------------------------------------------------------------------------------- +StaticPopupDialogs["RAIDLOGAUTO_COMBATLOG_REMINDER"] = { + text = "RaidLogAuto:\n\n" + .. "1. Make sure Advanced Combat Logging is enabled in " + .. "System > Network > Advanced Combat Logging. " + .. "RaidLogAuto will enable it automatically when logging starts, " + .. "but the setting should stay on.\n\n" + .. "2. Delete your CombatLog.txt file (in WoW\\Logs\\) before each " + .. "raid session. Mixing old and new combat logs will cause " + .. "WarcraftLogs and WoWAnalyzer to reject the upload.\n\n" + .. "Click OK to dismiss this reminder permanently.", + button1 = "OK, Got It", + OnAccept = function() + RaidLogAutoDB.combatLogReminderDismissed = true + end, + timeout = 0, + whileDead = true, + hideOnEscape = false, + preferredIndex = 3, +} + local function OnEvent(self, event, arg1) if event == "ADDON_LOADED" and arg1 == ADDON_NAME then for key, value in pairs(defaults) do @@ -88,6 +133,8 @@ local function OnEvent(self, event, arg1) self:RegisterEvent("PLAYER_ENTERING_WORLD") self:RegisterEvent("ZONE_CHANGED_NEW_AREA") + C_Timer.After(3, ShowCombatLogReminder) + elseif event == "PLAYER_ENTERING_WORLD" then C_Timer.After(1, UpdateLogging) @@ -112,6 +159,11 @@ local function PrintStatus() print(" Raid Only: " .. (RaidLogAutoDB.raidOnly and "Yes" or "No")) print(" Print Messages: " .. (RaidLogAutoDB.printMessages and "Yes" or "No")) print(" Currently Logging: " .. (LoggingCombat() and COLOR_GREEN .. "Yes" or COLOR_RED .. "No") .. COLOR_RESET) + local acl = GetCVar("advancedCombatLogging") + if acl ~= nil then + Print("Advanced Combat Logging: " + .. (acl == "1" and (COLOR_GREEN .. "ON") or (COLOR_RED .. "OFF"))) + end end local function PrintHelp() @@ -121,6 +173,7 @@ local function PrintHelp() print(" /rla off - Disable addon") print(" /rla toggle - Toggle addon on/off") print(" /rla silent - Toggle chat messages") + Print(COLOR_GREEN .. "/rla acl" .. COLOR_WHITE .. " - Check/enable Advanced Combat Logging") print(" /rla help - Show this help") end @@ -149,6 +202,18 @@ SlashCmdList["RAIDLOGAUTO"] = function(msg) RaidLogAutoDB.printMessages = not RaidLogAutoDB.printMessages print(COLOR_YELLOW .. "[RaidLogAuto]|r Messages " .. (RaidLogAutoDB.printMessages and "enabled" or "disabled")) + elseif cmd == "acl" then + local acl = GetCVar("advancedCombatLogging") + if acl == nil then + Print(COLOR_RED .. "Advanced Combat Logging CVar not available.") + elseif acl == "1" then + Print("Advanced Combat Logging: " .. COLOR_GREEN .. "ON") + else + SetCVar("advancedCombatLogging", "1") + Print("Advanced Combat Logging was " .. COLOR_RED .. "OFF" + .. COLOR_WHITE .. ". " .. COLOR_GREEN .. "Enabled it for you.") + end + elseif cmd == "help" or cmd == "?" then PrintHelp() diff --git a/RaidLogAuto_Mists.lua b/RaidLogAuto_Mists.lua index 94da0e7..edd8549 100644 --- a/RaidLogAuto_Mists.lua +++ b/RaidLogAuto_Mists.lua @@ -16,10 +16,15 @@ local defaults = { raidOnly = true, mythicPlus = false, printMessages = true, + combatLogReminderDismissed = false, } local IsInInstance = IsInInstance local LoggingCombat = LoggingCombat +local GetCVar = GetCVar +local SetCVar = SetCVar +local StaticPopupDialogs = StaticPopupDialogs +local StaticPopup_Show = StaticPopup_Show local print = print local L = { @@ -31,6 +36,7 @@ local L = { local COLOR_YELLOW = "|cffffff00" local COLOR_GREEN = "|cff00ff00" local COLOR_RED = "|cffff0000" +local COLOR_WHITE = "|cffffffff" local COLOR_RESET = "|r" ------------------------------------------------------------------------------- @@ -70,6 +76,21 @@ local function ShouldEnableLogging() return false end +local function CheckAdvancedCombatLogging() + local acl = GetCVar("advancedCombatLogging") + if acl == nil then return end + if acl == "0" then + SetCVar("advancedCombatLogging", "1") + Print(COLOR_YELLOW .. "Advanced Combat Logging was disabled. " + .. COLOR_GREEN .. "Automatically enabled it for you.") + end +end + +local function ShowCombatLogReminder() + if RaidLogAutoDB.combatLogReminderDismissed then return end + StaticPopup_Show("RAIDLOGAUTO_COMBATLOG_REMINDER") +end + local function UpdateLogging() local shouldLog = ShouldEnableLogging() local currentlyLogging = LoggingCombat() @@ -77,6 +98,7 @@ local function UpdateLogging() if shouldLog and not currentlyLogging then LoggingCombat(true) Print(COLOR_GREEN .. L.ENABLED .. COLOR_RESET) + CheckAdvancedCombatLogging() elseif not shouldLog and currentlyLogging then LoggingCombat(false) Print(COLOR_RED .. L.DISABLED .. COLOR_RESET) @@ -89,6 +111,29 @@ end local frame = CreateFrame("Frame") +------------------------------------------------------------------------------- +-- Static Popup: CombatLog.txt Reminder +------------------------------------------------------------------------------- +StaticPopupDialogs["RAIDLOGAUTO_COMBATLOG_REMINDER"] = { + text = "RaidLogAuto:\n\n" + .. "1. Make sure Advanced Combat Logging is enabled in " + .. "System > Network > Advanced Combat Logging. " + .. "RaidLogAuto will enable it automatically when logging starts, " + .. "but the setting should stay on.\n\n" + .. "2. Delete your CombatLog.txt file (in WoW\\Logs\\) before each " + .. "raid session. Mixing old and new combat logs will cause " + .. "WarcraftLogs and WoWAnalyzer to reject the upload.\n\n" + .. "Click OK to dismiss this reminder permanently.", + button1 = "OK, Got It", + OnAccept = function() + RaidLogAutoDB.combatLogReminderDismissed = true + end, + timeout = 0, + whileDead = true, + hideOnEscape = false, + preferredIndex = 3, +} + local function OnEvent(self, event, arg1) if event == "ADDON_LOADED" and arg1 == ADDON_NAME then for key, value in pairs(defaults) do @@ -107,6 +152,8 @@ local function OnEvent(self, event, arg1) self:RegisterEvent("CHALLENGE_MODE_COMPLETED") end + C_Timer.After(3, ShowCombatLogReminder) + elseif event == "PLAYER_ENTERING_WORLD" then C_Timer.After(1, UpdateLogging) @@ -142,6 +189,11 @@ local function PrintStatus() end print(" Print Messages: " .. (RaidLogAutoDB.printMessages and "Yes" or "No")) print(" Currently Logging: " .. (LoggingCombat() and COLOR_GREEN .. "Yes" or COLOR_RED .. "No") .. COLOR_RESET) + local acl = GetCVar("advancedCombatLogging") + if acl ~= nil then + Print("Advanced Combat Logging: " + .. (acl == "1" and (COLOR_GREEN .. "ON") or (COLOR_RED .. "OFF"))) + end end local function PrintHelp() @@ -152,6 +204,7 @@ local function PrintHelp() print(" /rla toggle - Toggle addon on/off") print(" /rla mythic - Toggle Mythic+ logging (Retail only)") print(" /rla silent - Toggle chat messages") + Print(COLOR_GREEN .. "/rla acl" .. COLOR_WHITE .. " - Check/enable Advanced Combat Logging") print(" /rla help - Show this help") end @@ -185,6 +238,18 @@ SlashCmdList["RAIDLOGAUTO"] = function(msg) Print("Mythic+ is only available in Retail WoW.") end + elseif cmd == "acl" then + local acl = GetCVar("advancedCombatLogging") + if acl == nil then + Print(COLOR_RED .. "Advanced Combat Logging CVar not available.") + elseif acl == "1" then + Print("Advanced Combat Logging: " .. COLOR_GREEN .. "ON") + else + SetCVar("advancedCombatLogging", "1") + Print("Advanced Combat Logging was " .. COLOR_RED .. "OFF" + .. COLOR_WHITE .. ". " .. COLOR_GREEN .. "Enabled it for you.") + end + elseif cmd == "silent" or cmd == "quiet" then RaidLogAutoDB.printMessages = not RaidLogAutoDB.printMessages print(COLOR_YELLOW .. "[RaidLogAuto]|r Messages " .. (RaidLogAutoDB.printMessages and "enabled" or "disabled")) diff --git a/RaidLogAuto_Retail.lua b/RaidLogAuto_Retail.lua index 1072dc6..7c66561 100644 --- a/RaidLogAuto_Retail.lua +++ b/RaidLogAuto_Retail.lua @@ -16,10 +16,15 @@ local defaults = { raidOnly = true, mythicPlus = false, printMessages = true, + combatLogReminderDismissed = false, } local IsInInstance = IsInInstance local LoggingCombat = LoggingCombat +local GetCVar = GetCVar +local SetCVar = SetCVar +local StaticPopupDialogs = StaticPopupDialogs +local StaticPopup_Show = StaticPopup_Show local print = print local L = { @@ -31,6 +36,7 @@ local L = { local COLOR_YELLOW = "|cffffff00" local COLOR_GREEN = "|cff00ff00" local COLOR_RED = "|cffff0000" +local COLOR_WHITE = "|cffffffff" local COLOR_RESET = "|r" ------------------------------------------------------------------------------- @@ -70,6 +76,21 @@ local function ShouldEnableLogging() return false end +local function CheckAdvancedCombatLogging() + local acl = GetCVar("advancedCombatLogging") + if acl == nil then return end + if acl == "0" then + SetCVar("advancedCombatLogging", "1") + Print(COLOR_YELLOW .. "Advanced Combat Logging was disabled. " + .. COLOR_GREEN .. "Automatically enabled it for you.") + end +end + +local function ShowCombatLogReminder() + if RaidLogAutoDB.combatLogReminderDismissed then return end + StaticPopup_Show("RAIDLOGAUTO_COMBATLOG_REMINDER") +end + local function UpdateLogging() local shouldLog = ShouldEnableLogging() local currentlyLogging = LoggingCombat() @@ -77,6 +98,7 @@ local function UpdateLogging() if shouldLog and not currentlyLogging then LoggingCombat(true) Print(COLOR_GREEN .. L.ENABLED .. COLOR_RESET) + CheckAdvancedCombatLogging() elseif not shouldLog and currentlyLogging then LoggingCombat(false) Print(COLOR_RED .. L.DISABLED .. COLOR_RESET) @@ -89,6 +111,29 @@ end local frame = CreateFrame("Frame") +------------------------------------------------------------------------------- +-- Static Popup: CombatLog.txt Reminder +------------------------------------------------------------------------------- +StaticPopupDialogs["RAIDLOGAUTO_COMBATLOG_REMINDER"] = { + text = "RaidLogAuto:\n\n" + .. "1. Make sure Advanced Combat Logging is enabled in " + .. "System > Network > Advanced Combat Logging. " + .. "RaidLogAuto will enable it automatically when logging starts, " + .. "but the setting should stay on.\n\n" + .. "2. Delete your CombatLog.txt file (in WoW\\Logs\\) before each " + .. "raid session. Mixing old and new combat logs will cause " + .. "WarcraftLogs and WoWAnalyzer to reject the upload.\n\n" + .. "Click OK to dismiss this reminder permanently.", + button1 = "OK, Got It", + OnAccept = function() + RaidLogAutoDB.combatLogReminderDismissed = true + end, + timeout = 0, + whileDead = true, + hideOnEscape = false, + preferredIndex = 3, +} + local function OnEvent(self, event, arg1) if event == "ADDON_LOADED" and arg1 == ADDON_NAME then for key, value in pairs(defaults) do @@ -107,6 +152,8 @@ local function OnEvent(self, event, arg1) self:RegisterEvent("CHALLENGE_MODE_COMPLETED") end + C_Timer.After(3, ShowCombatLogReminder) + elseif event == "PLAYER_ENTERING_WORLD" then C_Timer.After(1, UpdateLogging) @@ -142,6 +189,11 @@ local function PrintStatus() end print(" Print Messages: " .. (RaidLogAutoDB.printMessages and "Yes" or "No")) print(" Currently Logging: " .. (LoggingCombat() and COLOR_GREEN .. "Yes" or COLOR_RED .. "No") .. COLOR_RESET) + local acl = GetCVar("advancedCombatLogging") + if acl ~= nil then + Print("Advanced Combat Logging: " + .. (acl == "1" and (COLOR_GREEN .. "ON") or (COLOR_RED .. "OFF"))) + end end local function PrintHelp() @@ -152,6 +204,7 @@ local function PrintHelp() print(" /rla toggle - Toggle addon on/off") print(" /rla mythic - Toggle Mythic+ logging (Retail only)") print(" /rla silent - Toggle chat messages") + Print(COLOR_GREEN .. "/rla acl" .. COLOR_WHITE .. " - Check/enable Advanced Combat Logging") print(" /rla help - Show this help") end @@ -185,6 +238,18 @@ SlashCmdList["RAIDLOGAUTO"] = function(msg) Print("Mythic+ is only available in Retail WoW.") end + elseif cmd == "acl" then + local acl = GetCVar("advancedCombatLogging") + if acl == nil then + Print(COLOR_RED .. "Advanced Combat Logging CVar not available.") + elseif acl == "1" then + Print("Advanced Combat Logging: " .. COLOR_GREEN .. "ON") + else + SetCVar("advancedCombatLogging", "1") + Print("Advanced Combat Logging was " .. COLOR_RED .. "OFF" + .. COLOR_WHITE .. ". " .. COLOR_GREEN .. "Enabled it for you.") + end + elseif cmd == "silent" or cmd == "quiet" then RaidLogAutoDB.printMessages = not RaidLogAutoDB.printMessages print(COLOR_YELLOW .. "[RaidLogAuto]|r Messages " .. (RaidLogAutoDB.printMessages and "enabled" or "disabled")) diff --git a/RaidLogAuto_TBC.lua b/RaidLogAuto_TBC.lua index 1a37949..7f03d07 100644 --- a/RaidLogAuto_TBC.lua +++ b/RaidLogAuto_TBC.lua @@ -15,11 +15,16 @@ local defaults = { enabled = true, raidOnly = true, printMessages = true, + combatLogReminderDismissed = false, } +local GetCVar = GetCVar local IsInInstance = IsInInstance local LoggingCombat = LoggingCombat local print = print +local SetCVar = SetCVar +local StaticPopupDialogs = StaticPopupDialogs +local StaticPopup_Show = StaticPopup_Show local L = { ENABLED = COMBATLOGENABLED or "Combat logging enabled.", @@ -30,6 +35,7 @@ local L = { local COLOR_YELLOW = "|cffffff00" local COLOR_GREEN = "|cff00ff00" local COLOR_RED = "|cffff0000" +local COLOR_WHITE = "|cffffffff" local COLOR_RESET = "|r" ------------------------------------------------------------------------------- @@ -56,6 +62,21 @@ local function ShouldEnableLogging() return instanceType == "raid" end +local function CheckAdvancedCombatLogging() + local acl = GetCVar("advancedCombatLogging") + if acl == nil then return end + if acl == "0" then + SetCVar("advancedCombatLogging", "1") + Print(COLOR_YELLOW .. "Advanced Combat Logging was disabled. " + .. COLOR_GREEN .. "Automatically enabled it for you.") + end +end + +local function ShowCombatLogReminder() + if RaidLogAutoDB.combatLogReminderDismissed then return end + StaticPopup_Show("RAIDLOGAUTO_COMBATLOG_REMINDER") +end + local function UpdateLogging() local shouldLog = ShouldEnableLogging() local currentlyLogging = LoggingCombat() @@ -63,6 +84,7 @@ local function UpdateLogging() if shouldLog and not currentlyLogging then LoggingCombat(true) Print(COLOR_GREEN .. L.ENABLED .. COLOR_RESET) + CheckAdvancedCombatLogging() elseif not shouldLog and currentlyLogging then LoggingCombat(false) Print(COLOR_RED .. L.DISABLED .. COLOR_RESET) @@ -75,6 +97,29 @@ end local frame = CreateFrame("Frame") +------------------------------------------------------------------------------- +-- Static Popup: CombatLog.txt Reminder +------------------------------------------------------------------------------- +StaticPopupDialogs["RAIDLOGAUTO_COMBATLOG_REMINDER"] = { + text = "RaidLogAuto:\n\n" + .. "1. Make sure Advanced Combat Logging is enabled in " + .. "System > Network > Advanced Combat Logging. " + .. "RaidLogAuto will enable it automatically when logging starts, " + .. "but the setting should stay on.\n\n" + .. "2. Delete your CombatLog.txt file (in WoW\\Logs\\) before each " + .. "raid session. Mixing old and new combat logs will cause " + .. "WarcraftLogs and WoWAnalyzer to reject the upload.\n\n" + .. "Click OK to dismiss this reminder permanently.", + button1 = "OK, Got It", + OnAccept = function() + RaidLogAutoDB.combatLogReminderDismissed = true + end, + timeout = 0, + whileDead = true, + hideOnEscape = false, + preferredIndex = 3, +} + local function OnEvent(self, event, arg1) if event == "ADDON_LOADED" and arg1 == ADDON_NAME then for key, value in pairs(defaults) do @@ -88,6 +133,8 @@ local function OnEvent(self, event, arg1) self:RegisterEvent("PLAYER_ENTERING_WORLD") self:RegisterEvent("ZONE_CHANGED_NEW_AREA") + C_Timer.After(3, ShowCombatLogReminder) + elseif event == "PLAYER_ENTERING_WORLD" then C_Timer.After(1, UpdateLogging) @@ -112,6 +159,11 @@ local function PrintStatus() print(" Raid Only: " .. (RaidLogAutoDB.raidOnly and "Yes" or "No")) print(" Print Messages: " .. (RaidLogAutoDB.printMessages and "Yes" or "No")) print(" Currently Logging: " .. (LoggingCombat() and COLOR_GREEN .. "Yes" or COLOR_RED .. "No") .. COLOR_RESET) + local acl = GetCVar("advancedCombatLogging") + if acl ~= nil then + Print("Advanced Combat Logging: " + .. (acl == "1" and (COLOR_GREEN .. "ON") or (COLOR_RED .. "OFF"))) + end end local function PrintHelp() @@ -121,6 +173,7 @@ local function PrintHelp() print(" /rla off - Disable addon") print(" /rla toggle - Toggle addon on/off") print(" /rla silent - Toggle chat messages") + Print(COLOR_GREEN .. "/rla acl" .. COLOR_WHITE .. " - Check/enable Advanced Combat Logging") print(" /rla help - Show this help") end @@ -149,6 +202,18 @@ SlashCmdList["RAIDLOGAUTO"] = function(msg) RaidLogAutoDB.printMessages = not RaidLogAutoDB.printMessages print(COLOR_YELLOW .. "[RaidLogAuto]|r Messages " .. (RaidLogAutoDB.printMessages and "enabled" or "disabled")) + elseif cmd == "acl" then + local acl = GetCVar("advancedCombatLogging") + if acl == nil then + Print(COLOR_RED .. "Advanced Combat Logging CVar not available.") + elseif acl == "1" then + Print("Advanced Combat Logging: " .. COLOR_GREEN .. "ON") + else + SetCVar("advancedCombatLogging", "1") + Print("Advanced Combat Logging was " .. COLOR_RED .. "OFF" + .. COLOR_WHITE .. ". " .. COLOR_GREEN .. "Enabled it for you.") + end + elseif cmd == "help" or cmd == "?" then PrintHelp()