Documentation ¶
Index ¶
- Constants
- func ErrorParams(server string, c Client, cmd string)
- func Errorf(c Client, format string, args ...interface{})
- func HandleJoin(s Server, c Client, m parser.Message) error
- func HandleList(s Server, c Client, m parser.Message) error
- func HandleMode(s Server, c Client, m parser.Message) error
- func HandleNick(s Server, c Client, m parser.Message) error
- func HandlePart(s Server, c Client, m parser.Message) error
- func HandlePing(s Server, c Client, m parser.Message) error
- func HandlePrivmsg(s Server, c Client, m parser.Message) error
- func HandleQuit(s Server, c Client, m parser.Message) error
- func HandleTopic(s Server, c Client, m parser.Message) error
- func HandleUser(s Server, c Client, m parser.Message) error
- func HandleWho(s Server, c Client, m parser.Message) error
- func NewClient(srv Server, c net.Conn) *ircClient
- func Numeric(server string, c Client, code string, msg ...string)
- func Privmsg(to, from Client, msg string) error
- func SplitPrefix(prefix string) (nick, user, host string)
- type Channel
- type Client
- type Config
- type Ircd
- func (i *Ircd) AddChannel(ch Channel)
- func (i *Ircd) AddClient(c Client) error
- func (i *Ircd) Channels() map[string]Channel
- func (i *Ircd) DoMotd(c Client)
- func (i *Ircd) FindByNick(nick string) Client
- func (i *Ircd) FindChannel(name string) Channel
- func (i *Ircd) Handle(c Client, m parser.Message) error
- func (i *Ircd) Name() string
- func (i *Ircd) Privmsg(from Client, to, msg string) error
- func (i *Ircd) RemoveClient(c Client) error
- func (i *Ircd) Serve() (err error)
- func (i *Ircd) Stop() error
- type MessageHandler
- type Modeset
- type Server
Constants ¶
View Source
const ( CNick = iota CUser CReal CHost )
delete me
View Source
const ( ModeQuery = iota ModeAdd ModeDel )
Variables ¶
This section is empty.
Functions ¶
func ErrorParams ¶
ErrorParams sends an error to a client indicating more parameters are required for a command.
func HandleMode ¶
Change modes.
TODO(mischief): check for user/chan modes when channels are implemented
func HandleWho ¶
WHO
reply format: "<channel> <user> <host> <server> <nick> ( "H" / "G" > ["*"] [ ( "@" / "+" ) ] :<hopcount> <real name>" */
func SplitPrefix ¶
Types ¶
type Channel ¶
type Client ¶
type Client interface { Nick() string // e.g. "foo" SetNick(nick string) string User() string // e.g. "foo" SetUser(user string) string Real() string // e.g. "Billy Joe Foo" SetReal(realname string) string Host() string // e.g. "127.0.0.1" Prefix() string // e.g., "foo!foo@127.0.0.1" Send(prefix, command string, args ...string) error // send a message to the client Join(c Channel) // join user to channel Part(c Channel) // part user from channel Channels() []Channel // list of channels user is in }
type Ircd ¶
type Ircd struct {
// contains filtered or unexported fields
}
func (*Ircd) AddChannel ¶
func (*Ircd) FindByNick ¶
func (*Ircd) FindChannel ¶
func (*Ircd) RemoveClient ¶
type Modeset ¶
type Modeset struct {
// contains filtered or unexported fields
}
A mode set.
func NewModeset ¶
func NewModeset() *Modeset
Click to show internal directories.
Click to hide internal directories.