[PR #80] [CLOSED] Add comprehensive GameQ protocol support with query port offsets #104

Closed
opened 2026-05-07 00:18:07 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/pelican-dev/plugins/pull/80
Author: @Destructor
Created: 1/14/2026
Status: Closed

Base: mainHead: main


📝 Commits (8)

📊 Changes

187 files changed (+19288 additions, -78 deletions)

View changed files

player-counter/.gitignore (+14 -0)
📝 player-counter/README.md (+68 -1)
📝 player-counter/database/Seeders/PlayerCounterSeeder.php (+339 -25)
📝 player-counter/lang/en/query.php (+1 -1)
📝 player-counter/plugin.json (+4 -6)
📝 player-counter/routes/api-client.php (+2 -2)
📝 player-counter/src/Enums/GameQueryType.php (+266 -17)
📝 player-counter/src/Filament/Admin/Resources/GameQueries/GameQueryResource.php (+4 -4)
📝 player-counter/src/Filament/Admin/Resources/GameQueries/Pages/ManageGameQueries.php (+2 -2)
📝 player-counter/src/Filament/Server/Pages/PlayersPage.php (+3 -3)
📝 player-counter/src/Filament/Server/Widgets/ServerPlayerWidget.php (+2 -2)
player-counter/src/GameQ/Autoloader.php (+59 -0)
player-counter/src/GameQ/Buffer.php (+505 -0)
player-counter/src/GameQ/Exception/Protocol.php (+30 -0)
player-counter/src/GameQ/Exception/Query.php (+30 -0)
player-counter/src/GameQ/Exception/Server.php (+30 -0)
player-counter/src/GameQ/Filters/Base.php (+61 -0)
player-counter/src/GameQ/Filters/Normalize.php (+152 -0)
player-counter/src/GameQ/Filters/Secondstohuman.php (+112 -0)
player-counter/src/GameQ/Filters/Stripcolors.php (+164 -0)

...and 80 more files

📄 Description

This PR adds complete support for all 150+ GameQ protocols available in the plugin, with proper query port offset configuration for 47 games that require it. This ensures accurate server querying across a wide range of game servers.

Changes Made

  1. Enhanced Protocol Coverage (120+ games)
    File: database/Seeders/PlayerCounterSeeder.php

Added 60+ new game mappings to $eggMappings (from ~90 to 120+ games)
Implemented complete $queryPortOffsets array with 47 protocols requiring specific port offsets
Added support for: Counter-Strike variants, Quake series, Unreal Tournament series, Battlefield series, Call of Duty series, survival games, military simulators, racing games, and voice servers
File: src/Enums/GameQueryType.php

Added 60+ new enum cases for all available GameQ protocols
Updated getDefaultQueryPortOffset() method with all correct port offsets based on GameQ protocol definitions

Port Offsets Configured (47 protocols)
+1: 17 games (Rust, Arma 3, Barotrauma, Eco, Valheim, V Rising, etc.)
+2: 4 games (COD MW3, Life is Feudal, Miscreated, rFactor 2)
+3: 1 game (Battalion 1944)
+10: 1 game (Post Scriptum)
+15: 1 game (Hell Let Loose)
+29: 1 game (Insurgency: Sandstorm)
+101: 1 game (Terraria)
+123: 2 games (Multi Theft Auto, Soldat)
+8433 to +51800: Battlefield series, ARK, Squad, Atlas
+18243: America's Army 3
-36938: Mumble (negative offset)
New Games Added (60+)
Counter-Strike 1.5, CS:CZ, CS2, Half-Life 1, Natural Selection 2, Contagion, Fistful of Frags, The Ship, Brink, DayZ Mod, Wurm, Arma 2/OA, America's Army 3/PG, Call of Duty original/UO, GTA5M, rFactor 1/2, Quake 2/3/4/Live, Enemy Territory, ETQW, Unreal Tournament 2004/3, Unreal 2, Urban Terror, Jedi Academy/Outcast, Doom 3, Crysis series, Halo, Kingpin, MOHAA, SOF2, SWAT 4, Dawn of War, Warsow, Red Orchestra Ostfront, Just Cause 2/3, Pixark, Citadel, Modiverse, OpenTTD, Soldat, Teeworlds, Tibia, CS2D, TeamSpeak 2, Ventrilo

Benefits
Comprehensive game server support (120+ protocols)
Accurate query port configuration for all games
Automatic detection and configuration during seeding
Fixed database constraint issue preventing game query updates
All port offsets based on official GameQ protocol definitions

Testing
Verified all enum cases are properly defined
Confirmed port offsets match GameQ protocol $port_diff values
Tested seeder logic for automatic game detection
Fixed database constraint issue that prevented updating game queries

Breaking Changes
None. This is a backward-compatible enhancement.

image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pelican-dev/plugins/pull/80 **Author:** [@Destructor](https://github.com/Destructor) **Created:** 1/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (8) - [`7720303`](https://github.com/pelican-dev/plugins/commit/7720303246e7989cdb7e80d70ba3484f6a0294fb) New version - [`e8c2620`](https://github.com/pelican-dev/plugins/commit/e8c26207027235b8069481b56459c37397664f12) Work in progress before adding GameQ subtree - [`b6eccb8`](https://github.com/pelican-dev/plugins/commit/b6eccb89d36545721c0e129a0235e16e47c8c0f3) Squashed 'player-counter/src/GameQ/' content from commit 347cf58 - [`758eab2`](https://github.com/pelican-dev/plugins/commit/758eab2d8ee9ee3b3bbf0fba0aeeed5a3625ac9a) Merge commit 'b6eccb89d36545721c0e129a0235e16e47c8c0f3' as 'player-counter/src/GameQ' - [`7ed2f47`](https://github.com/pelican-dev/plugins/commit/7ed2f47f8794b4c672e4ddada64cc4c8c7c2e45d) Fix GameQ - [`0e06508`](https://github.com/pelican-dev/plugins/commit/0e06508e103e505c9fcb0db2145b6af7a606fff5) Update Readme - [`9378e92`](https://github.com/pelican-dev/plugins/commit/9378e9285ddb9526d16eaf3b3696dbfc06cf89cf) Update Readme 2 - [`93d1804`](https://github.com/pelican-dev/plugins/commit/93d180402927e6c0bdb70ee45b7ac5841905d006) Add Protocols ### 📊 Changes **187 files changed** (+19288 additions, -78 deletions) <details> <summary>View changed files</summary> ➕ `player-counter/.gitignore` (+14 -0) 📝 `player-counter/README.md` (+68 -1) 📝 `player-counter/database/Seeders/PlayerCounterSeeder.php` (+339 -25) 📝 `player-counter/lang/en/query.php` (+1 -1) 📝 `player-counter/plugin.json` (+4 -6) 📝 `player-counter/routes/api-client.php` (+2 -2) 📝 `player-counter/src/Enums/GameQueryType.php` (+266 -17) 📝 `player-counter/src/Filament/Admin/Resources/GameQueries/GameQueryResource.php` (+4 -4) 📝 `player-counter/src/Filament/Admin/Resources/GameQueries/Pages/ManageGameQueries.php` (+2 -2) 📝 `player-counter/src/Filament/Server/Pages/PlayersPage.php` (+3 -3) 📝 `player-counter/src/Filament/Server/Widgets/ServerPlayerWidget.php` (+2 -2) ➕ `player-counter/src/GameQ/Autoloader.php` (+59 -0) ➕ `player-counter/src/GameQ/Buffer.php` (+505 -0) ➕ `player-counter/src/GameQ/Exception/Protocol.php` (+30 -0) ➕ `player-counter/src/GameQ/Exception/Query.php` (+30 -0) ➕ `player-counter/src/GameQ/Exception/Server.php` (+30 -0) ➕ `player-counter/src/GameQ/Filters/Base.php` (+61 -0) ➕ `player-counter/src/GameQ/Filters/Normalize.php` (+152 -0) ➕ `player-counter/src/GameQ/Filters/Secondstohuman.php` (+112 -0) ➕ `player-counter/src/GameQ/Filters/Stripcolors.php` (+164 -0) _...and 80 more files_ </details> ### 📄 Description This PR adds complete support for all 150+ GameQ protocols available in the plugin, with proper query port offset configuration for 47 games that require it. This ensures accurate server querying across a wide range of game servers. **Changes Made** 1. Enhanced Protocol Coverage (120+ games) File: database/Seeders/PlayerCounterSeeder.php Added 60+ new game mappings to $eggMappings (from ~90 to 120+ games) Implemented complete $queryPortOffsets array with 47 protocols requiring specific port offsets Added support for: Counter-Strike variants, Quake series, Unreal Tournament series, Battlefield series, Call of Duty series, survival games, military simulators, racing games, and voice servers File: src/Enums/GameQueryType.php Added 60+ new enum cases for all available GameQ protocols Updated getDefaultQueryPortOffset() method with all correct port offsets based on GameQ protocol definitions **Port Offsets Configured (47 protocols)** +1: 17 games (Rust, Arma 3, Barotrauma, Eco, Valheim, V Rising, etc.) +2: 4 games (COD MW3, Life is Feudal, Miscreated, rFactor 2) +3: 1 game (Battalion 1944) +10: 1 game (Post Scriptum) +15: 1 game (Hell Let Loose) +29: 1 game (Insurgency: Sandstorm) +101: 1 game (Terraria) +123: 2 games (Multi Theft Auto, Soldat) +8433 to +51800: Battlefield series, ARK, Squad, Atlas +18243: America's Army 3 -36938: Mumble (negative offset) New Games Added (60+) Counter-Strike 1.5, CS:CZ, CS2, Half-Life 1, Natural Selection 2, Contagion, Fistful of Frags, The Ship, Brink, DayZ Mod, Wurm, Arma 2/OA, America's Army 3/PG, Call of Duty original/UO, GTA5M, rFactor 1/2, Quake 2/3/4/Live, Enemy Territory, ETQW, Unreal Tournament 2004/3, Unreal 2, Urban Terror, Jedi Academy/Outcast, Doom 3, Crysis series, Halo, Kingpin, MOHAA, SOF2, SWAT 4, Dawn of War, Warsow, Red Orchestra Ostfront, Just Cause 2/3, Pixark, Citadel, Modiverse, OpenTTD, Soldat, Teeworlds, Tibia, CS2D, TeamSpeak 2, Ventrilo **Benefits** ✅ Comprehensive game server support (120+ protocols) ✅ Accurate query port configuration for all games ✅ Automatic detection and configuration during seeding ✅ Fixed database constraint issue preventing game query updates ✅ All port offsets based on official GameQ protocol definitions **Testing** Verified all enum cases are properly defined Confirmed port offsets match GameQ protocol $port_diff values Tested seeder logic for automatic game detection Fixed database constraint issue that prevented updating game queries **Breaking Changes** None. This is a backward-compatible enhancement. <img width="1462" height="681" alt="image" src="https://github.com/user-attachments/assets/fb811b8c-a841-4433-9b00-d5206c09fa5f" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:18:07 +02:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/plugins#104
No description provided.