msg

package
v0.0.0-...-037ac2a Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Split

func Split(s, d string) (string, string)

Split will split s around d, returning two strings.

Types

type Msg

type Msg struct {
	// contains filtered or unexported fields
}

Msg is a structure which represents a single message received from an IRCd

func InternalError

func InternalError(err error) *Msg

func Parse

func Parse(line string) *Msg

Parse will return a Msg struct pointer, populated with the parsed fields of a single IRC line.

func (*Msg) Args

func (m *Msg) Args() string

Args returns any additional arguments associated with the message

func (*Msg) Cmd

func (m *Msg) Cmd() string

Cmd returns the command associated with the message

func (*Msg) Content

func (m *Msg) Content() string

Content returns the message content

func (*Msg) Host

func (m *Msg) Host() string

Host returns the host of the user who sent the message.

func (*Msg) Nick

func (m *Msg) Nick() string

Nick returns the nick who sent the message

func (*Msg) Rcpt

func (m *Msg) Rcpt() string

Rcpt returns the intended recipient of the message

func (*Msg) Timestamp

func (m *Msg) Timestamp() string

Timstamp returns the timestamp the message was parsed at

func (*Msg) User

func (m *Msg) User() string

User returns the user who sent the message

Jump to

Keyboard shortcuts

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