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:
Edmund Huber 2014-03-22 22:25:24 +01:00
parent bffad06a26
commit 6267b6a40c
5 changed files with 14 additions and 16 deletions

View file

@ -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) {