@@ -248,7 +248,7 @@ async function updateLoop() {
248248 await pool . query (
249249 `INSERT INTO servers (ip, port, game, version, hostname, os, secure, status, map, player_count, maxplayers, bot_count, players_list, region, domain, api_id, kzt_id, tickrate)
250250 VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
251- ON DUPLICATE KEY UPDATE version=VALUES(version), hostname=VALUES(hostname), os=VALUES(os), secure=VALUES(secure), status=VALUES(status), map=VALUES(map), player_count=VALUES(player_count), maxplayers=VALUES(maxplayers), bot_count=VALUES(bot_count), players_list=VALUES(players_list), region=VALUES(region), domain=VALUES(domain), api_id=VALUES(api_id), kzt_id=VALUES(kzt_id), tickrate=VALUES(tickrate), last_update=NOW()` ,
251+ ON DUPLICATE KEY UPDATE version=VALUES(version), hostname=COALESCE( VALUES(hostname), hostname), os=COALESCE( VALUES(os), os), secure=COALESCE( VALUES(secure), secure), status=VALUES(status), map=VALUES(map), player_count=VALUES(player_count), maxplayers=VALUES(maxplayers), bot_count=VALUES(bot_count), players_list=VALUES(players_list), region=VALUES(region), domain=VALUES(domain), api_id=VALUES(api_id), kzt_id=VALUES(kzt_id), tickrate=VALUES(tickrate), last_update=NOW()` ,
252252 [
253253 server . ip ,
254254 server . port ,
@@ -274,7 +274,7 @@ async function updateLoop() {
274274 // Record historical data
275275 await recordServerHistory ( server , result ) ;
276276
277- // Track player sessions (only if we have Steam IDs from RCON )
277+ // Track player sessions (only if we have Steam IDs from plugin )
278278 if ( result . players && result . players . length > 0 ) {
279279 const playersWithSteamId = result . players . filter ( ( p ) => p . steamid ) ;
280280 if ( playersWithSteamId . length > 0 ) {
0 commit comments