diff --git a/Lucien/Rust/src/client.rs b/Lucien/Rust/src/client.rs index 154f81a..5f80b60 100644 --- a/Lucien/Rust/src/client.rs +++ b/Lucien/Rust/src/client.rs @@ -79,6 +79,14 @@ fn write_to_server(stream: TcpStream) { writer.flush().unwrap(); } line => { + if line.len() > 2000 { + println!( + "{}", + "Cannot send a message longer than 2000 characters" + .bright_red() + ); + continue; + } writeln!(writer, "MSG {}", line).unwrap(); writer.flush().unwrap(); }