Skip to content

feat(ticket): .ticket payload subcommands (ZeroGM ticket-console transport)#431

Open
MadMaxMangos wants to merge 4 commits into
masterfrom
feature/ticket-payload-console
Open

feat(ticket): .ticket payload subcommands (ZeroGM ticket-console transport)#431
MadMaxMangos wants to merge 4 commits into
masterfrom
feature/ticket-payload-console

Conversation

@MadMaxMangos

@MadMaxMangos MadMaxMangos commented Jul 6, 2026

Copy link
Copy Markdown
Member

What

Adds a read-only .ticket payload {list|show|ping} GM subcommand family (SEC_GAMEMASTER) that pushes the open GM-ticket queue to the requesting GM's own session over the addon channel, so an in-client addon (ZeroGM's Tickets tab) can render the queue and triage tickets. The 1.12 client has no GM-queue API, so the server ships all state.

How

  • .ticket payload list — enumerates open tickets (sTicketMgr) and sends a byte-budgeted, chunked list (id · name · age · online · snippet).
  • .ticket payload show <#id|$char> — sends one ticket's full detail plus the creator's live position (online Player*, else a characters lookup) with a posvalid flag.
  • .ticket payload ping — GM-gated transport diagnostic.
  • Transport: builds SMSG_MESSAGECHAT with LANG_ADDON to the requesting GM's session (the Eluna SendAddonMessage pattern); prefixed + chunked framing ZGMTKT\t<kind>\t<seq>\t<total>\t<body>, ~200-byte chunks.

Scope / safety

  • Read-only: does not close, delete, or modify tickets. Every leaf command is SEC_GAMEMASTER (the enforced gate).
  • No new config and no schema change; the outbound push is not gated by CONFIG_BOOL_ADDON_CHANNEL.
  • The wire format has an authoritative Python reference + unit tests (in the companion ZeroGM addon).

Testing

  • Builds clean (RelWithDebInfo) on current master (rebased onto 9b255672).
  • In-client smoke: queue list, detail view, Go To / Summon / Whisper / Resolve, and chat-frame suppression — all verified.

🤖 Generated with Claude Code


This change is Reviewable

MadMaxMangos and others added 4 commits July 7, 2026 00:03
…cation

The list loop was bounded by record count (GM.TicketListSize=30) but SendTicketPayload
truncates by bytes (200*16=3200). A queue of many long/escape-heavy snippets could exceed
3200 and resize()-truncate the tail record into an unparseable <5-field fragment that the
addon drops. Stop appending once the next record would cross the byte cap.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 9 duplication

Metric Results
Complexity 0
Duplication 9

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@AppVeyorBot

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants