Skip to content

Fix broadcasting of RCON items and souvenir cases#32

Merged
GT-610 merged 2 commits into
mainfrom
fix/issue-31-item-found-chat
Jul 18, 2026
Merged

Fix broadcasting of RCON items and souvenir cases#32
GT-610 merged 2 commits into
mainfrom
fix/issue-31-item-found-chat

Conversation

@GT-610

@GT-610 GT-610 commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Resolve #31

Summary by CodeRabbit

  • New Features

    • RCON-granted items now support a unified creation flow with clearer error reporting.
    • Added support for identifying traded item origins.
    • Souvenir items now correctly distinguish crate-based acquisition from tournament drops.
  • Documentation

    • Removed the RCON and souvenir package documentation.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@GT-610, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: be1f1664-ae47-4b5b-9ff5-835e0bf3b238

📥 Commits

Reviewing files that changed from the base of the PR and between 143c61d and 8c2f9c9.

📒 Files selected for processing (7)
  • csgo_gc/gc_client.cpp
  • csgo_gc/gc_const_csgo.h
  • csgo_gc/inventory.cpp
  • csgo_gc/inventory.h
  • csgo_gc/souvenir.cpp
  • docs/rcon.md
  • docs/souvenirs.md
📝 Walkthrough

Walkthrough

RCON item creation now uses a unified CreateRconItem path with traded acquisition metadata and specific errors. Souvenir openings use crate-origin acknowledgement metadata. The RCON and souvenir documentation files were removed.

Changes

Acquisition origin handling

Layer / File(s) Summary
RCON creation contract and trade origin
csgo_gc/gc_const_csgo.h, csgo_gc/inventory.h, csgo_gc/inventory.cpp
Adds ItemOriginTraded, renames the RCON creation helper to CreateRconItem, and assigns traded origin and acknowledgement values.
Unified RCON give_item flow
csgo_gc/gc_client.cpp, docs/rcon.md
Routes each item through CreateRconItem, removes failed updates, and returns specific creation errors; the RCON documentation is removed.
Souvenir crate acknowledgement
csgo_gc/souvenir.cpp, docs/souvenirs.md
Uses UnacknowledgedFoundInCrate for souvenir items and removes the souvenir documentation.
Possibly related PRs
  • GT-610/csgo-gc#16: Provides the RCON server and command infrastructure connected to the updated give_item flow.
  • GT-610/csgo-gc#26: Also changes RconGiveItem and the inventory parameterized-item creation path.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR also deletes two documentation files unrelated to the requested chat-message fixes. Separate the docs removals into a different PR or restore them if they were unintended.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main behavior change: RCON item handling and souvenir case chat fixes.
Linked Issues check ✅ Passed The item origin changes cover both requested chat behaviors for souvenir openings and RCON grants.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
csgo_gc/gc_client.cpp (1)

887-895: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Simplify the error return.

The special case for "unknown defindex" evaluates to the exact same string as the fallback case ("ERR " + "unknown defindex"). This if block can be safely removed to simplify the error handling logic.

♻️ Proposed refactor
         if (!itemId)
         {
             updates.pop_back();
-            if (error == "unknown defindex")
-            {
-                return "ERR unknown defindex";
-            }
             return std::string{ "ERR " }.append(error);
         }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@csgo_gc/gc_client.cpp` around lines 887 - 895, Remove the redundant `"unknown
defindex"` conditional in the error handling block, leaving the
`updates.pop_back()` call followed by the existing generic `"ERR " + error`
return in the surrounding item-processing logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@csgo_gc/gc_client.cpp`:
- Around line 887-895: Remove the redundant `"unknown defindex"` conditional in
the error handling block, leaving the `updates.pop_back()` call followed by the
existing generic `"ERR " + error` return in the surrounding item-processing
logic.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8e7ef3c6-a32e-4dc8-839d-5e99fcb1a7d7

📥 Commits

Reviewing files that changed from the base of the PR and between 0e32ce0 and 143c61d.

📒 Files selected for processing (7)
  • csgo_gc/gc_client.cpp
  • csgo_gc/gc_const_csgo.h
  • csgo_gc/inventory.cpp
  • csgo_gc/inventory.h
  • csgo_gc/souvenir.cpp
  • docs/rcon.md
  • docs/souvenirs.md
💤 Files with no reviewable changes (2)
  • docs/souvenirs.md
  • docs/rcon.md

@GT-610
GT-610 force-pushed the fix/issue-31-item-found-chat branch from 143c61d to 8c2f9c9 Compare July 18, 2026 04:14
@GT-610
GT-610 merged commit 4a145e1 into main Jul 18, 2026
5 checks passed
@GT-610
GT-610 deleted the fix/issue-31-item-found-chat branch July 18, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No drop message in the chat when opening souvenirs

1 participant