fix the chatspam problem again again
This commit is contained in:
parent
3e6285c076
commit
8d73f281d2
|
@ -281,7 +281,6 @@ async fn handle_packet(e: Event, config: &Config, client: &mut Client, ws_stream
|
|||
if !pkt.content().starts_with("/skill") {
|
||||
info!("<{} ({})> {}", pkt.username().unwrap_or("SYSTEM".to_string()), pkt.uuid().map(|u| u.to_string()).unwrap_or("SYSTEM".to_string()), pkt.message());
|
||||
handle_message(pkt.clone(), client, config).await;
|
||||
}
|
||||
|
||||
let re = Regex::new(r"@[a-z0-9_-]+:").unwrap();
|
||||
if !(re.is_match(&pkt.content()) && pkt.uuid() == Some(config.server.uuid)) {
|
||||
|
@ -293,6 +292,9 @@ async fn handle_packet(e: Event, config: &Config, client: &mut Client, ws_stream
|
|||
timestamp: DateTime::from(SystemTime::now()),
|
||||
}})?)).await?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue