diff --git a/CHANGELOG.md b/CHANGELOG.md index 291a1ed..b3e3850 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * Fix `Post Scriptum` not being on the valve protocol. * Fix `Epic` protocol's `numplayers` not being in the `raw` field. * Added support for the Minecraft [Better Compatibility Checker](https://www.curseforge.com/minecraft/mc-mods/better-compatibility-checker) Mod. +* Halo Online (ElDewrito) - Added support (by @Sphyrna-029) ### 4.2.0 * Renamed `Counter Strike: 2D` to `CS2D` in [games.txt](games.txt) (why? see [this](https://cs2d.com/faq.php?show=misc_name#misc_name)). diff --git a/GAMES_LIST.md b/GAMES_LIST.md index c0c1060..99e84f3 100644 --- a/GAMES_LIST.md +++ b/GAMES_LIST.md @@ -109,6 +109,7 @@ | `drakan` | Drakan: Order of the Flame (1999) | | | `dys` | Dystopia (2005) | [Valve Protocol](#valve) | | `eco` | Eco (2018) | | +| `eldewrito` | Halo Online - ElDewrito (2007) | | | `em` | Empires Mod (2008) | [Valve Protocol](#valve) | | `empyrion` | Empyrion - Galactic Survival (2015) | [Valve Protocol](#valve) | | `etqw` | Enemy Territory: Quake Wars (2007) | | diff --git a/games.txt b/games.txt index c625ffb..9d0d8cb 100644 --- a/games.txt +++ b/games.txt @@ -121,6 +121,7 @@ drakan|Drakan: Order of the Flame (1999)|gamespy1|port=27045,port_query_offset=1 dst|Don't Starve Together (2016)|valve|port=10999,port_query=27016 dys|Dystopia (2005)|valve|port=27015 eco|Eco (2018)|eco|port=3000,port_query_offset=1 +eldewrito|Halo Online (ElDewrito)|eldewrito|port=11775 em|Empires Mod (2008)|valve|port=27015 empyrion|Empyrion - Galactic Survival (2015)|valve|port=30000,port_query_offset=1 etqw|Enemy Territory: Quake Wars (2007)|doom3|port=3074,port_query=27733 diff --git a/protocols/eldewrito.js b/protocols/eldewrito.js new file mode 100644 index 0000000..487306e --- /dev/null +++ b/protocols/eldewrito.js @@ -0,0 +1,24 @@ +const Core = require('./core'); + +class Eldewrito extends Core { + async run (state) { + const json = await this.request({ + url: 'http://' + this.options.address + ':' + this.options.port, + responseType: 'json' + }) + + for (const one of json.players) { + state.players.push({ name: one.name, team: one.team }) + } + + state.name = json.name + state.map = json.map + state.maxplayers = json.maxPlayers + state.connect = this.options.address + ":" + json.port + + state.raw = json + } +} + +module.exports = Eldewrito; +