Add Terraria player detection via log parsing
All checks were successful
Deploy GSM / deploy (push) Successful in 27s
All checks were successful
Deploy GSM / deploy (push) Successful in 27s
- Add getTerrariaPlayers function in ssh.js for PM2 log parsing - Support German and English join/leave messages - Update rcon.js to use Terraria log parsing - Add Terraria to player fetch conditions in servers.js - Update autoshutdown.js and discordBot.js for Terraria support - Update config path to tModLoader directory - Add global error handlers in server.js - Update CLAUDE.md with deployment rules and Terraria info Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -348,8 +348,8 @@ router.get('/', optionalAuth, async (req, res) => {
|
||||
getCurrentMetrics(server.id).catch(() => ({
|
||||
cpu: 0, cpuCores: 1, memory: 0, memoryUsed: 0, memoryTotal: 0, uptime: 0
|
||||
})),
|
||||
(server.rconPassword || server.type === 'hytale') ? getPlayers(server).catch(() => ({ online: 0, max: null })) : { online: 0, max: null },
|
||||
(server.rconPassword || server.type === 'hytale') ? getPlayerList(server).catch(() => ({ players: [] })) : { players: [] },
|
||||
(server.rconPassword || server.type === 'hytale' || server.type === 'terraria') ? getPlayers(server).catch(() => ({ online: 0, max: null })) : { online: 0, max: null },
|
||||
(server.rconPassword || server.type === 'hytale' || server.type === 'terraria') ? getPlayerList(server).catch(() => ({ players: [] })) : { players: [] },
|
||||
getProcessUptime(server).catch(() => 0)
|
||||
]);
|
||||
|
||||
@@ -586,8 +586,8 @@ router.get('/:id', authenticateToken, rejectGuest, async (req, res) => {
|
||||
getCurrentMetrics(server.id).catch(() => ({
|
||||
cpu: 0, cpuCores: 1, memory: 0, memoryUsed: 0, memoryTotal: 0, uptime: 0
|
||||
})),
|
||||
server.rconPassword ? getPlayers(server).catch(() => ({ online: 0, max: null })) : { online: 0, max: null },
|
||||
server.rconPassword ? getPlayerList(server).catch(() => ({ players: [] })) : { players: [] },
|
||||
(server.rconPassword || server.type === 'hytale' || server.type === 'terraria') ? getPlayers(server).catch(() => ({ online: 0, max: null })) : { online: 0, max: null },
|
||||
(server.rconPassword || server.type === 'hytale' || server.type === 'terraria') ? getPlayerList(server).catch(() => ({ players: [] })) : { players: [] },
|
||||
getProcessUptime(server).catch(() => 0)
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user