Handle NICK from IRC

This commit is contained in:
Yash Karandikar 2022-01-23 12:59:57 -06:00
parent d1babea3af
commit 13cb669543
Signed by untrusted user: karx
GPG key ID: A794DA2529474BA5

View file

@ -632,6 +632,14 @@ async fn irc_loop(
channel_id
.say(&http, format!("*{}* has quit ({})", nickname, reason))
.await?;
} else if let Command::NICK(ref new_nick) = orig_message.command {
let old_nick = orig_message.source_nickname().unwrap();
channel_id
.say(
&http,
format!("*{}* is now known as *{}*", old_nick, new_nick),
)
.await?;
}
}
Ok(())