Skip to content

Commit

Permalink
Fix self-join causing IRC to re-join fresh
Browse files Browse the repository at this point in the history
  • Loading branch information
hloeung committed Dec 13, 2023
1 parent f63818e commit 757864a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm-go-irckit/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (ch *channel) Part(u *User, text string) {
if _, ok := ch.usersIdx[u.ID()]; !ok {
ch.mu.Unlock()
for _, to := range ch.usersIdx {
if !to.Ghost {
if !to.Ghost && to.Nick != u.Nick {
to.Encode(msg) //nolint:errcheck
}
}
Expand Down Expand Up @@ -348,7 +348,7 @@ func (ch *channel) Join(u *User) error {
ch.mu.Unlock()
for _, to := range ch.usersIdx {
// only send join messages to real users
if !to.Ghost {
if !to.Ghost && to.Nick != u.Nick {
to.Encode(msg) //nolint:errcheck
}
}
Expand Down

0 comments on commit 757864a

Please sign in to comment.