Some user/channel modes.

This commit is contained in:
Jeremy Latt
2012-12-09 21:46:22 -08:00
parent 41e79e3b09
commit 78e741af3b
2 changed files with 53 additions and 6 deletions

View File

@@ -1,13 +1,31 @@
package irc
type Channel struct {
name string
key string
topic string
members ClientSet
server *Server
name string
key string
topic string
members ClientSet
operators ClientSet
creators ClientSet
voiced ClientSet
invites map[string]bool
// modes
anonymous bool
inviteOnly bool
invites map[string]bool
server *Server
moderated bool
noOutside bool
quiet bool
private bool
secret bool
serverReop bool
operTopic bool
// modes with args
password string
userLimit int
banMask string
banExceptMask string
inviteMask string
}
type ChannelSet map[*Channel]bool
@@ -43,6 +61,10 @@ func (ch *Channel) Nicks() []string {
return nicks
}
func (ch *Channel) IsEmpty() bool {
return len(ch.members) == 0
}
//
// channel functionality
//