mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 15:27:28 +00:00
17 lines
471 B
Rust
17 lines
471 B
Rust
use crate::errors::GDError;
|
|
use crate::valve::{Response, ValveProtocol, App, GatheringSettings};
|
|
|
|
pub struct TF2;
|
|
|
|
impl TF2 {
|
|
pub fn query(address: &str, port: Option<u16>) -> Result<Response, GDError> {
|
|
ValveProtocol::query(App::TF2, address, match port {
|
|
None => 27015,
|
|
Some(port) => port
|
|
}, GatheringSettings {
|
|
info: false,
|
|
players: false,
|
|
rules: true
|
|
})
|
|
}
|
|
}
|