mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-18 09:35:50 +00:00
Counter-Strike support.
This commit is contained in:
parent
645582868d
commit
aec145a847
6 changed files with 21 additions and 2 deletions
12
src/games/cs.rs
Normal file
12
src/games/cs.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
use crate::GDResult;
|
||||
use crate::protocols::valve;
|
||||
use crate::protocols::valve::{game, SteamID};
|
||||
|
||||
pub fn query(address: &str, port: Option<u16>) -> GDResult<game::Response> {
|
||||
let valve_response = valve::query(address, match port {
|
||||
None => 27015,
|
||||
Some(port) => port
|
||||
}, SteamID::CS.as_app(), None, None)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
|
|
@ -49,3 +49,5 @@ pub mod tfc;
|
|||
pub mod sc;
|
||||
/// Rust
|
||||
pub mod rust;
|
||||
/// Counter-Strike
|
||||
pub mod cs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue