forked from External/ergo
fix #2113
Persisting always-on clients was panicking if client X believed it was a member of channel Y, but channel Y didn't have a record of client X.
This commit is contained in:
parent
a4d160b76d
commit
4aa1aa371d
2 changed files with 10 additions and 3 deletions
|
|
@ -1803,7 +1803,11 @@ func (client *Client) performWrite(additionalDirtyBits uint) {
|
|||
channels := client.Channels()
|
||||
channelToModes := make(map[string]alwaysOnChannelStatus, len(channels))
|
||||
for _, channel := range channels {
|
||||
chname, status := channel.alwaysOnStatus(client)
|
||||
ok, chname, status := channel.alwaysOnStatus(client)
|
||||
if !ok {
|
||||
client.server.logger.Error("internal", "client and channel membership out of sync", chname, client.Nick())
|
||||
continue
|
||||
}
|
||||
channelToModes[chname] = status
|
||||
}
|
||||
client.server.accounts.saveChannels(account, channelToModes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue