channel

package
v0.0.0-...-4813284 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2014 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NS_LOCAL_RAW               = "&"
	NS_NETWORK_RAW             = "#"
	NS_NETWORK_SAFE_RAW        = "!"
	NS_NETWORK_UNMODERATED_RAW = "+"
	NS_SOFTCHAN_RAW            = "."
	NS_GLOBAL_RAW              = "~"
)

Channel Namespace/Prefix

View Source
const (
	NS_LOCAL               = 0x01 // '&'
	NS_NETWORK             = 0x02 // '#'
	NS_NETWORK_SAFE        = 0x04 // '!'
	NS_NETWORK_UNMODERATED = 0x08 // '+'
	NS_SOFTCHAN            = 0x10 // '.'
	NS_GLOBAL              = 0x20 // '~'
)
View Source
const (
	MODE_CREATOR    = 0x01
	MODE_OPERATOR   = 0x02
	MODE_VOICE      = 0x04
	MODE_ANONYMOUS  = 0x08
	MODE_INVITE     = 0x10
	MODE_MODERATED  = 0x20
	MODE_NO_MESSAGE = 0x40
	MODE_QUIET      = 0x80
	MODE_PRIVATE    = 0x100
	MODE_SECRET     = 0x200
	MODE_REOP       = 0x400
	MODE_KEY        = 0x800
	MODE_LIMIT      = 0x1000
	MODE_BAN        = 0x2000
	MODE_EXCEPTION  = 0x4000
	MODE_INVITATION = 0x8000
)
View Source
const (
	MAX_NAME_LENGTH = 50
	MIN_NAME_LENGTH = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Id        int
	Namespace int
	Name      string
	Modes     int
	// contains filtered or unexported fields
}

func New

func New(s string) (*Channel, error)

func (*Channel) Broadcast

func (c *Channel) Broadcast(m *message.Message, exludes []int) error

func (*Channel) Count

func (c *Channel) Count() int

func (*Channel) Exists

func (c *Channel) Exists(uid int) bool

func (*Channel) Join

func (c *Channel) Join(newUser *user.User) error

func (*Channel) JoinedUsers

func (c *Channel) JoinedUsers() []*user.User

func (*Channel) Quit

func (c *Channel) Quit(uid int) error

func (*Channel) SetTopic

func (c *Channel) SetTopic(s string, who string)

func (*Channel) String

func (c *Channel) String() string

func (*Channel) Topic

func (c *Channel) Topic() string

func (*Channel) TopicSetBy

func (c *Channel) TopicSetBy() string

func (*Channel) TopicSetTime

func (c *Channel) TopicSetTime() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL