fix stuff

This commit is contained in:
Maple 2025-07-31 14:24:11 +02:00
commit d5f8e127a3

View file

@ -44,6 +44,16 @@ pub async fn get_agreement(lang: &str, ip: CFIP) -> io::Result<Ds<RawXml<NamedFi
};
if EVIL_AGREEMENT_THING.read().await.contains(&ip.0) {
let path = {
let mut path = base_path;
path.push("EVIL.xml");
path
};
Ok(Ds(RawXml(NamedFile::open(&path).await?)))
} else {
let requested_file_path = {
let mut path = base_path.clone();
@ -66,15 +76,5 @@ pub async fn get_agreement(lang: &str, ip: CFIP) -> io::Result<Ds<RawXml<NamedFi
Ok(Ds(RawXml(NamedFile::open(&fallback_path).await?)))
}
} else {
let path = {
let mut path = base_path;
path.push("EVIL.xml");
path
};
Ok(Ds(RawXml(NamedFile::open(&path).await?)))
}
}