mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Protocol] GameSpy 1 support with the games Unreal Tournament and Battlefield 1942. (#9)
* Initial files + unreal tournament * Fix master_querant * Split by delimiter and collect into hashmap * Furter port to accept more packets * Improve getting the server's values * Some initial players parsing * Players parsing * Add error handling * Add some more fields * Add Battlefield 1942 support. * Add query_vars and some docs
This commit is contained in:
parent
5604436553
commit
950c08c18e
12 changed files with 276 additions and 5 deletions
10
src/games/bf1942.rs
Normal file
10
src/games/bf1942.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
use crate::GDResult;
|
||||
use crate::protocols::gamespy;
|
||||
use crate::protocols::gamespy::Response;
|
||||
|
||||
pub fn query(address: &str, port: Option<u16>) -> GDResult<Response> {
|
||||
gamespy::one::query(address, match port {
|
||||
None => 23000,
|
||||
Some(port) => port
|
||||
}, None)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue