Commit graph

236 commits

Author SHA1 Message Date
CosminPerRam
9c93e40650
[CI] Pin specific rustfmt version (#57)
* [CI] Specify specific rustfmt version

* [CI] Specify platform in CI for rustfmt

* [CI] Fix cargo fmt running missing nightly version
2023-06-25 15:42:29 +03:00
Tom
89fbd81331
[Crate] Add clippy and rustfmt pre-commit hooks (#50)
These hooks can be installed using [pre-commit], with:
"pre-commit install". Once installed they will prevent you from
committing if the staged code has clippy warnings or hasn't been
formatted. You can skip the pre-commit checks by adding the "-n" flag to
your git commit command.

The hooks also require rustup as the nightly versions of rustfmt and
clippy are used.

[pre-commit]: https://pre-commit.com/
2023-06-25 14:41:20 +03:00
CosminPerRam
31162b6d6e [Crate] Modify GAMES.md to make it more cohesive. 2023-06-19 23:05:41 +03:00
CosminPerRam
c3e2d948e8
[Game] Add JC2MP support. (#54)
* [Game] Add JC2MP support.

* [Game] Add game to changelog and games

* [Games] Add generic support to JC2MP.

* [Game] Add players_maximum and players_online
2023-06-19 22:10:49 +03:00
CosminPerRam
cb9384e474 [Crate] Updated CHANGELOG.md to include generic query 2023-06-19 19:59:06 +03:00
Tom
01b47d54e1
[Crate] Fix response table not showing inner types (#52) 2023-06-16 19:04:34 +03:00
CosminPerRam
7f9b4ca98a [Crate] Update RESPONSES.md 2023-06-16 18:24:44 +03:00
Tom
4b081371f4
[Crate] Add better documentation for generic game implementation (#49) 2023-06-14 23:25:26 +03:00
CosminPerRam
08e00c64e4 [CI] Replace check by clippy 2023-06-14 15:38:08 +03:00
CosminPerRam
6486c1e17b [CI] Reorder steps again and change some steps names 2023-06-13 22:20:31 +03:00
CosminPerRam
3fd3c7aa5b [CI] Add cargo audit to CI 2023-06-13 22:16:14 +03:00
CosminPerRam
8bc05013ee [CI] Resort check and build steps so build is the first 2023-06-13 22:15:10 +03:00
CosminPerRam
a377b76a55 [Games] Generic query add support for GS2 protocol and Halo:CE game 2023-06-13 22:09:51 +03:00
CosminPerRam
e44a680a59 [Example] Add pretty print of receiving struct. 2023-06-13 22:01:51 +03:00
Tom
d853189e06
[Games] Programmatic games by storing information as data (#45)
* Define games as structs

* Create table of response types

* Ensure serde is always included

* Remove server_ prefix in GenericResponse

* Make players online/max non-optional in generic response

* Use already existing minecraft server enum

* Implement ExtraResponses to prevent cloning when creating generic

* Add game definitions

* Add doc comments to generic types

* Include players in gamespy extra responses

* Add custom response types for TheShip and FFOW

* Cargo format differing files

* Final cleanup
2023-06-13 21:49:58 +03:00
CosminPerRam
26ad1f5d19
[Protocol] Add GameSpy 2 support. (#47)
* [Protocol] Add initial files

* [Protocol] Add test to test the request

* [Protocol] Add initial query response type

* [Protocol] Parse teams

* [Protocol] Add players parse and add nice macro

* [Protocol] Add proper derives to structs

* [Protocol] Change to get all informations from one request

* [Protocol] Add Halo: CE support and update CHANGELOG.md

* [Protocol] Remove a .clone usage

* [Protocol] Add todo comment regarding code performance

* [Protocol] Use iterator instead of index range
2023-06-12 19:38:34 +03:00
CosminPerRam
80637f2398 [Crate] Apply clippy fixes 2023-06-11 13:16:22 +03:00
Tom
b95b2abe0f
[Crate] Enforce formatting in CI (#46)
* [CI] Check formatting

* Format all files
2023-06-10 18:15:12 +03:00
CosminPerRam
a6279177bb [Crate] Add MSRV change to CHANGELOG.md 2023-06-07 00:01:56 +03:00
CosminPerRam
bfa2c9826f [Crate] Fix github workflow ci 2023-06-06 23:34:59 +03:00
CosminPerRam
4a8ad7c3dc [Crate] Update Github workflow to confirm MSRV 2023-06-06 23:31:19 +03:00
CosminPerRam
c73334f45d [Crate] Fix msrv and change it to 1.60 2023-06-06 22:58:24 +03:00
CosminPerRam
d1ca19647d [Crate] Bump version to 0.2.3 2023-06-02 01:19:32 +03:00
CosminPerRam
e0830bdae5
[Protocol] Replace IpAddr with SocketAddr in protocols (#44)
* [Crate] Replace IpAddr with SocketAddr in protocols

* [Crate] Remove usage of address.to_string in socket

* [Crate] Update CHANGELOG.md
2023-06-02 01:06:24 +03:00
CosminPerRam
596d15df78 [Protocol] Quake change get response header to str 2023-06-02 00:31:02 +03:00
CosminPerRam
3a9bd77efe [Protocol] Use string literals to better show what the response header bytes mean 2023-06-02 00:29:23 +03:00
CosminPerRam
a0681f4259 [Games] Add Soldier of Fortune 2 support. 2023-05-30 18:53:23 +03:00
CosminPerRam
b3ba7df6d9 [Games] Add Hell Let Loose support. 2023-05-30 16:48:19 +03:00
CosminPerRam
06a2ceeda9 [Games] Add Quake 3 support and change players frags from u16 to i16 2023-05-30 16:23:37 +03:00
CosminPerRam
af5e0d1fbf [Games] Add Quake 1 support. 2023-05-30 16:18:04 +03:00
CosminPerRam
c874b463e3 [Protocol] Fix Quake 1 implementation. 2023-05-30 16:15:08 +03:00
CosminPerRam
f79f2ea2de [Games] Add Quake 2 support. 2023-05-30 15:57:17 +03:00
CosminPerRam
0ceb31bf86 [Crate] Apply cargo clippy fixes 2023-05-30 15:49:35 +03:00
CosminPerRam
d302d1173f
[Protocol] Add quake protocols. (#35)
* [Protocol] Initial packet receive implementation

* [Protocol] Add key extraction

* [Protocol] Fix new Ipv4Addr query address and get string with unended

* [Protocol] Properly parse the received data

* [Protocol] Add parse players

* [Protocol] Add bots

* [Protocol] Extract into functions

* [Protocol] Remove quotes from player name

* [Protocol] Add two and three files

* [Protocol] Make quake queries very modular

* [Protocol] Remove the need of a client instance

* [Protocol] Revesed if statement

* [Protocol] Apply clippy fixes and replace String by &str in get send header

* [Protocol] Add one and three implementations

* [Protocol] Add quake2 and quake3 to master_querant

* [Protocol] Fix Q2 implementation

* [Protocol] Change from Ipv4Addr to IpAddr

* [Protocol] Fix Q3 response header

* [Protocol] Fix Q3 response

* [Crate] Add Q1, 2 and 3 to changelog and protocols

* [Protocol] Extract client into separate file and add some docs
2023-05-30 15:33:41 +03:00
CosminPerRam
3dbc6498ed [Crate] Add Douile acknowledgement to Changelog 2023-05-29 11:19:16 +03:00
Tom
3f654e0dfd
[Protocol] Enable the use of Ipv6 addresses (#41)
Replace usages of Ipv4Addr with IpAddr which allows the use of either Ipv4 or Ipv6.

This patch essentially consists of running:
"sed -i 's/Ipv4Addr/IpAddr/g' src/**/*.rs examples/*"
and fixing the errors.
2023-05-29 11:10:21 +03:00
CosminPerRam
e620398615 [Crate] Changed all address &str to &Ipv4Addr 2023-05-27 00:41:41 +03:00
CosminPerRam
a69896f737 [Service] Fix tests 2023-05-08 15:34:59 +03:00
CosminPerRam
f843780469 [Service] Removed Filters and SearchFilters lifetimes and changed str instances to String 2023-05-08 15:31:38 +03:00
CosminPerRam
a8e2b51dbb Revert "[Service] Add merge methods on SearchFilters"
This reverts commit a17f5ad4d2.
2023-05-08 15:16:54 +03:00
CosminPerRam
a17f5ad4d2 [Service] Add merge methods on SearchFilters 2023-05-08 14:59:55 +03:00
CosminPerRam
fc52f3fe91 [Protocol] Add derives and serde derives to GatheringSettings 2023-05-08 02:08:22 +03:00
CosminPerRam
726bfd429f [Crate] Bump version to 0.2.2 2023-05-01 20:27:39 +03:00
CosminPerRam
33e8f43cb8 [Games] Add Crysis Wars support. 2023-04-30 01:26:12 +03:00
CosminPerRam
3ef599056a [Protocol] GS3 if no player/team data is gathered, dont try to create a struct 2023-04-30 01:20:16 +03:00
CosminPerRam
8abb657800 [Service] Update docs. 2023-04-30 00:50:51 +03:00
CosminPerRam
9f22a4eadf [Crate] Add no_services feature flag 2023-04-30 00:42:01 +03:00
CosminPerRam
4c4b9d6b45 [Crate] Edit serde feature to clarify serialization/deserialization for response types 2023-04-30 00:34:04 +03:00
CosminPerRam
6c9f554751 [Service] Make Filter to_bytes take self instead of &self 2023-04-30 00:22:47 +03:00
CosminPerRam
ed2934f3fa [Service] Replace repetitive code with a function 2023-04-30 00:20:24 +03:00