rust/hedgewars-server/src/handlers/checker.rs
author Wuzzy <Wuzzy@disroot.org>
Wed, 28 Jun 2023 18:57:00 +0200
changeset 15967 f362e82cddcf
parent 15882 f185e7367dd3
permissions -rw-r--r--
CS: Disable game flags incompatible with this script

use log::*;

use crate::core::{server::HwServer, types::CheckerId};
use hedgewars_network_protocol::messages::HwProtocolMessage;

pub fn handle(
    server: &mut HwServer,
    checker_id: CheckerId,
    _response: &mut super::Response,
    message: HwProtocolMessage,
) {
    match message {
        HwProtocolMessage::CheckerReady => {
            server
                .get_checker_mut(checker_id)
                .map(|c| c.set_is_ready(true));
            warn!("Unimplemented")
        }
        HwProtocolMessage::CheckedOk(info) => {
            warn!("Unimplemented")
        }
        HwProtocolMessage::CheckedFail(message) => {
            warn!("Unimplemented")
        }
        _ => warn!("Unknown command"),
    }
}