bring formatting from bRAC

This commit is contained in:
MeexReay 2025-04-14 20:45:04 +03:00
parent 472ff20858
commit 7834e4ccfd
3 changed files with 949 additions and 6 deletions

948
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -5,3 +5,4 @@ edition = "2024"
[dependencies] [dependencies]
chrono = "0.4.40" chrono = "0.4.40"
bRAC = { git = "https://github.com/MeexReay/bRAC.git" }

View File

@ -47,7 +47,9 @@ fn accept_stream(mut stream: TcpStream, messages: Arc<RwLock<Vec<u8>>>) -> Resul
msg.push(b' '); msg.push(b' ');
msg.append(&mut buf); msg.append(&mut buf);
println!("{}", String::from_utf8_lossy(&msg)); if let Some(msg) = bRAC::chat::format_message(true, String::from_utf8_lossy(&msg).to_string()) {
println!("{}", msg);
}
msg.push(b'\n'); msg.push(b'\n');