mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 15:27:28 +00:00
[Protocol] Add optional address field to quake 2 player
This commit is contained in:
parent
8316dac2cc
commit
84ebeb8065
2 changed files with 6 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ Who knows what the future holds...
|
|||
### Changes:
|
||||
Protocols:
|
||||
- GameSpy 2 support.
|
||||
- Quake 2: Added Optional address field to Player.
|
||||
|
||||
Generic query:
|
||||
- Added generic queries (by [@Douile](https://github.com/Douile)) which come with a common struct for the response fields.
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ pub struct Player {
|
|||
pub frags: i16,
|
||||
pub ping: u16,
|
||||
pub name: String,
|
||||
pub address: Option<String>,
|
||||
}
|
||||
|
||||
impl QuakePlayerType for Player {
|
||||
|
|
@ -54,6 +55,10 @@ impl QuakeClient for QuakeTwo {
|
|||
None => Err(GDError::PacketBad)?,
|
||||
Some(v) => remove_wrapping_quotes(v).to_string(),
|
||||
},
|
||||
address: match data.next() {
|
||||
None => None,
|
||||
Some(v) => Some(remove_wrapping_quotes(v).to_string()),
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue