:cutoff', ['cutoff' => CONFIG_DEBUG ? 0 : time() - 310]); $lookup = []; foreach ($res as $row) { $lookup[$row['fixedip'] ?? $row['clientip'] ?? ''] = $row['serverid']; } return $lookup; } public static function getServer(string $serverId) { return Database::queryFirst('SELECT s.serverid, IFNULL(s.fixedip, m.clientip) AS clientip FROM dnbd3_server s LEFT JOIN machine m ON (s.machineuuid = m.machineuuid) WHERE s.serverid = :id', ['id' => $serverId]); } }