mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 10:42:52 +01:00
fix #745
This commit is contained in:
parent
e10a5f07de
commit
90b428b416
@ -214,6 +214,9 @@ func (cm *ChannelManager) SetRegistered(channelName string, account string) (err
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
cm.registeredChannels.Add(cfname)
|
cm.registeredChannels.Add(cfname)
|
||||||
|
if skel, err := Skeleton(channel.Name()); err == nil {
|
||||||
|
cm.registeredSkeletons.Add(skel)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,6 +246,9 @@ func (cm *ChannelManager) SetUnregistered(channelName string, account string) (e
|
|||||||
}
|
}
|
||||||
entry.channel.SetUnregistered(account)
|
entry.channel.SetUnregistered(account)
|
||||||
delete(cm.registeredChannels, cfname)
|
delete(cm.registeredChannels, cfname)
|
||||||
|
if skel, err := Skeleton(entry.channel.Name()); err == nil {
|
||||||
|
delete(cm.registeredSkeletons, skel)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -350,9 +356,9 @@ func (cm *ChannelManager) IsPurged(chname string) (result bool) {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
cm.Lock()
|
cm.RLock()
|
||||||
result = cm.purgedChannels.Has(chname)
|
result = cm.purgedChannels.Has(chname)
|
||||||
cm.Unlock()
|
cm.RUnlock()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user