mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
refactor synchronization for Channel
This commit is contained in:
parent
c026cc5ab6
commit
fa83ccd82b
9 changed files with 434 additions and 342 deletions
10
irc/types.go
10
irc/types.go
|
|
@ -139,13 +139,3 @@ func (members MemberSet) AnyHasMode(mode Mode) bool {
|
|||
|
||||
// ChannelSet is a set of channels.
|
||||
type ChannelSet map[*Channel]bool
|
||||
|
||||
// Add adds the given channel to this set.
|
||||
func (channels ChannelSet) Add(channel *Channel) {
|
||||
channels[channel] = true
|
||||
}
|
||||
|
||||
// Remove removes the given channel from this set.
|
||||
func (channels ChannelSet) Remove(channel *Channel) {
|
||||
delete(channels, channel)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue