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

@@ -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 };