Add Palworld player count and list support via RCON
All checks were successful
Deploy GSM / deploy (push) Successful in 41s

- Add ShowPlayers RCON command handling for Palworld servers
- Update SSH access documentation with jump host instructions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-11 20:58:11 +01:00
parent b07ec607eb
commit 4bfb870fbb
2 changed files with 21 additions and 1 deletions

View File

@@ -40,7 +40,12 @@ The homelab consists of:
**Domain**: zeasy.dev with subdomains managed via Cloudflare DDNS (gsm.zeasy.dev, factorio.zeasy.dev, palworld.zeasy.dev, pz.zeasy.dev)
**SSH Access**: The monitor server (.30) has SSH key access to Proxmox and all game servers for remote management.
**SSH Access**: Zugriff auf Server erfolgt über den Pi als Jump-Host:
```bash
ssh alex@192.168.2.10 # Erst auf den Pi
ssh root@192.168.2.XX # Dann zum Zielserver (z.B. .53 für Palworld)
```
Oder in einem Befehl: `ssh alex@192.168.2.10 "ssh root@192.168.2.53 'befehl'"`
## Language Note

View File

@@ -87,6 +87,11 @@ export async function getPlayers(server) {
// Count lines that contain player info
const lines = response.split('\n').filter(l => l.trim() && !l.includes('listusers'));
result = { online: lines.length, max: null };
} else if (server.type === 'palworld') {
const response = await sendRconCommand(server, 'ShowPlayers');
// Format: "name,playeruid,steamid\nPlayer1,123,765...\nPlayer2,456,765..."
const lines = response.split('\n').filter(l => l.trim() && !l.toLowerCase().startsWith('name,'));
result = { online: lines.length, max: null };
}
playerCache.set(cacheKey, { data: result, time: Date.now() });
@@ -145,6 +150,16 @@ export async function getPlayerList(server) {
// Parse player names from listusers output
const lines = response.split('\n').filter(l => l.trim() && !l.includes('listusers'));
players = lines.map(l => l.trim()).filter(p => p);
} else if (server.type === 'palworld') {
const response = await sendRconCommand(server, 'ShowPlayers');
// Format: "name,playeruid,steamid\nPlayer1,123,765...\nPlayer2,456,765..."
const lines = response.split('\n').filter(l => l.trim() && !l.toLowerCase().startsWith('name,'));
for (const line of lines) {
const parts = line.split(',');
if (parts.length >= 1 && parts[0].trim()) {
players.push(parts[0].trim());
}
}
}
const result = { players };