Skip to content

Commit

Permalink
Only return join event when we joined channel
Browse files Browse the repository at this point in the history
  • Loading branch information
tarkah committed Sep 24, 2024
1 parent bd717e2 commit 7879273
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions data/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,8 @@ impl Client {
}
log::debug!("[{}] {channel} - WHO requested", self.server);
}

return Some(vec![Event::JoinedChannel(channel.clone())]);
} else if let Some(channel) = self.chanmap.get_mut(channel) {
let user = if self.supports_extended_join {
accountname.as_ref().map_or(user.clone(), |accountname| {
Expand All @@ -873,11 +875,6 @@ impl Client {

channel.users.insert(user);
}

return Some(vec![
Event::JoinedChannel(channel.clone()),
Event::Single(message, self.nickname().to_owned()),
]);
}
Command::KICK(channel, victim, _) => {
if victim == self.nickname().as_ref() {
Expand Down

0 comments on commit 7879273

Please sign in to comment.