whois

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2016 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WhoIsChannelModeNone = WhoIsChannelMode(0)
)

Variables

View Source
var ErrInvalidNick = errors.New("Invalid or no nickname given")
View Source
var ErrNoSuchNick = errors.New("No such nick/channel")

Functions

This section is empty.

Types

type Plugin

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

func New

func New(b bot.Bot, isupportPlugin *isupport.Plugin) *Plugin

func Register

func Register(b bot.Bot, isupportPlugin *isupport.Plugin) *Plugin

func (*Plugin) WhoIs

func (p *Plugin) WhoIs(nick string) (resp *WhoIsResponse, err error)

type WhoIsChannelMode

type WhoIsChannelMode rune

type WhoIsResponse

type WhoIsResponse struct {

	// The user's nickname.
	Nick     string
	Ident    string
	Host     string
	Realname string

	// TODO 312 RPL_WHOISSERVER "<nick> <server> :<server info>"
	Server WhoIsServerInfo

	// TODO 313 RPL_WHOISOPERATOR "<nick> :is an IRC operator"
	IsOperator bool

	// TODO 301 RPL_AWAY "<nick> :<away message>"
	IsAway      bool
	AwayMessage string

	// TODO 317 RPL_WHOISIDLE "<nick> <integer> :seconds idle"
	IdleDuration time.Duration
	SignOnTime   time.Time

	// TODO 319 RPL_WHOISCHANNELS "<nick> :*( ( "@" / "+" ) <channel> " " )"
	Channels map[string]WhoIsChannelMode
}

type WhoIsServerInfo

type WhoIsServerInfo struct {
	// The server's hostname
	Host string

	// The information associated with this server
	Info string
}

Jump to

Keyboard shortcuts

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