mirror of
https://github.com/jeremyd/ergo.git
synced 2026-05-10 22:29:08 -07:00
Some user/channel modes.
This commit is contained in:
@@ -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
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user