diff --git a/package-lock.json b/package-lock.json index ab07249..3e2d551 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "game-server-watcher", - "version": "2.5.0", + "version": "2.5.1", "license": "AGPL-3.0-or-later", "dependencies": { "@commonify/lowdb": "^3.0.0", diff --git a/src/server.ts b/src/server.ts index ab9a27f..5455a9c 100644 --- a/src/server.ts +++ b/src/server.ts @@ -85,10 +85,13 @@ createServer(async (req, res) => { 'Cache-Control': 'max-age=0' }); + const gdProtocols = ['protocol-ase', 'protocol-battlefield', 'protocol-doom3', 'protocol-epic', 'protocol-gamespy1', 'protocol-gamespy2', 'protocol-gamespy3', 'protocol-goldsrc', 'protocol-nadeo', 'protocol-quake2', 'protocol-quake3', 'protocol-unreal2', 'protocol-valve']; + const types = Array.from(games.keys()); + const names = Array.from(games.values()).map(g=>g.pretty); res.end(JSON.stringify({ - enum: Array.from(games.keys()), + enum: [...types, ...gdProtocols], options: { - enum_titles: Array.from(games.values()).map(g=>g.pretty) + enum_titles: [...names, ...gdProtocols] } } as SelectOptionsResponse, null, DBG ? 2 : 0)); } else if (SECRET !== '' && req.headers['x-btoken']) {