forked from External/ergo
clean up /theater so that it doesn't need a bunch of pointers and that it reuses channel-scoped-user-modes machinery
This commit is contained in:
parent
bffad06a26
commit
6267b6a40c
5 changed files with 14 additions and 16 deletions
|
|
@ -83,6 +83,15 @@ func (members MemberSet) HasMode(member *Client, mode ChannelMode) bool {
|
|||
return modes[mode]
|
||||
}
|
||||
|
||||
func (members MemberSet) AnyHasMode(mode ChannelMode) bool {
|
||||
for _, modes := range members {
|
||||
if modes[Theater] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type ChannelSet map[*Channel]bool
|
||||
|
||||
func (channels ChannelSet) Add(channel *Channel) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue