Remove \u{f} from the end of a message

This commit is contained in:
Yash Karandikar 2022-07-29 18:45:36 -05:00
parent 226043f67b
commit 331ef2db6f

View file

@ -177,13 +177,15 @@ impl EventHandler for Handler {
.and_then(|v| v.strip_suffix('\x0F')) .and_then(|v| v.strip_suffix('\x0F'))
.map(|v| (v, v.is_empty())) .map(|v| (v, v.is_empty()))
{ {
let to_send = stripped.trim_matches('\u{f}');
sender.send_privmsg(channel, &prefix).unwrap(); sender.send_privmsg(channel, &prefix).unwrap();
sender.send_privmsg(channel, stripped).unwrap(); sender.send_privmsg(channel, to_send).unwrap();
} else { } else {
for line in computed.lines() { for line in computed.lines() {
for chunk in StrChunks::new(line, content_limit) { for chunk in StrChunks::new(line, content_limit) {
let to_send = chunk.trim_matches('\u{f}');
sender sender
.send_privmsg(channel, &format!("{}{}", prefix, chunk)) .send_privmsg(channel, &format!("{}{}", prefix, to_send))
.unwrap(); .unwrap();
} }
} }