mirror of
https://github.com/pelican-dev/plugins.git
synced 2026-05-09 00:08:54 +02:00
[PR #120] [CLOSED] feat(player-counter): add TeamSpeak 3 ServerQuery support #124
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/plugins#124
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pelican-dev/plugins/pull/120
Author: @IceCupe123
Created: 4/11/2026
Status: ❌ Closed
Base:
main← Head:feature/teamspeak-query📝 Commits (2)
9d17556feat(player-counter): add TeamSpeak 3 ServerQuery support6e6ecccfix: resolve PHPStan and Pint CI failures📊 Changes
3 files changed (+183 additions, -3 deletions)
View changed files
➕
player-counter/src/Extensions/Query/Schemas/TeamSpeakQueryTypeSchema.php(+156 -0)📝
player-counter/src/Models/GameQuery.php(+25 -3)📝
player-counter/src/Providers/PlayerCounterPluginProvider.php(+2 -0)📄 Description
Summary
TeamSpeakQueryTypeSchema— connects via raw TCP to the TeamSpeak 3 ServerQuery interface, reads server name, max clients and connected players, filters out ServerQuery clients (client_type=1), and unescapes TS3 protocol encodingGameQuery::runQuery()now checks for an optionalresolvePort(Allocation $allocation): ?intmethod on schemas, allowing them to resolve the query port from server variables instead of relying solely on thequery_port_offset. Schemas without this method continue to work exactly as beforeGameQuery::canRunQuery()andrunQuery()now support hostname-basedip_aliasvalues (not just raw IPs), which is required for servers bound to0.0.0.0behind a reverse proxyWhy the resolvePort() hook?
TeamSpeak exposes its ServerQuery port as a configurable server variable (
QUERY_PORT), independent of the voice port. A static offset would break whenever an admin changes the query port. The hook lets the schema read the actual configured value directly from the server.The hook is fully backwards-compatible — existing schemas and the
query_port_offsetfield are unaffected.Test plan
QUERY_PORTuses the correct port0.0.0.0with a hostnameip_aliasresolves correctly🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes / Reliability
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.