fix autojoin on kick

This commit is contained in:
sad 2024-03-21 14:33:43 -06:00
parent 512a406f43
commit 06b32db707
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG Key ID: 28D3A882F3E6AD02

View File

@ -217,9 +217,9 @@ async fn writemsg(mut writer: tokio::io::WriteHalf<tokio_native_tls::TlsStream<T
} }
} }
if *cmd == "KICK" { if *cmd == "KICK" {
let channel = parts[2]; let channel = parts.get(2).unwrap_or(&"");
let userme = parts[3]; let userme = parts.get(3).unwrap_or(&"");
if userme == nickname { if *userme == nickname {
writer.write_all(format!("JOIN {}\r\n", channel).as_bytes()).await.unwrap(); writer.write_all(format!("JOIN {}\r\n", channel).as_bytes()).await.unwrap();
writer.flush().await.unwrap(); writer.flush().await.unwrap();
} }