Documentation
¶
Index ¶
- Constants
- Variables
- func New(server *Server) *ircClient.Conn
- func StatusMessage(view *gocui.View, data string)
- type Channel
- func (channel *Channel) AddNick(nick string)
- func (channel *Channel) Current() bool
- func (channel *Channel) FindUser(nick string) *User
- func (channel *Channel) NickListString(v *gocui.View, c bool)
- func (channel *Channel) NickMetricsString(view *gocui.View)
- func (channel *Channel) RemoveNick(nick string)
- func (channel *Channel) Render(update bool) error
- func (channel *Channel) Update() (*gocui.View, error)
- func (channel *Channel) View() (*gocui.View, error)
- type Handler
- type NickSorter
- type RenderHandlerFunc
- type Server
- func (server *Server) AddChannel(channel *Channel)
- func (server *Server) ChannelView(name string) (*gocui.View, error)
- func (server *Server) Exec(channel string, h Handler)
- func (server *Server) FindChannel(name string) *Channel
- func (server *Server) GetCurrentChannel() *Channel
- func (server *Server) HasChannel(name string) (*Channel, int, bool)
- func (server *Server) NewChannel(name string, private bool) error
- func (server *Server) RemoveChannel(name string) (int, error)
- type User
Constants ¶
const (
// StatusChannel default name
StatusChannel = "komanda-status"
)
Variables ¶
var IrcCodes = []string{}/* 162 elements not displayed */
IrcCodes for message hanlders https://www.alien.net.au/irc/irc2numerics.html
Functions ¶
func StatusMessage ¶
StatusMessage will formart a string and write to the status channel
Types ¶
type Channel ¶
type Channel struct {
Status bool
Ready bool
Unread bool
Highlight bool
Name string
Server *Server
MaxX int
MaxY int
RenderHandler RenderHandlerFunc
Topic string
TopicSetBy string
Users []*User
NickListReady bool
Loading *nbc.NonBlockingChan
Private bool
// contains filtered or unexported fields
}
Channel struct
func (*Channel) Current ¶ added in v0.9.2
Current returns true or false if the current channel is this channel
func (*Channel) NickListString ¶
NickListString will output the channel users in a pretty format
func (*Channel) NickMetricsString ¶
NickMetricsString will output channel metrics in a pretty format 09:41 * Irssi: #google-containers: Total of 213 nicks [0 ops, 0 halfops, 0 voices, 213 normal]
func (*Channel) RemoveNick ¶
RemoveNick from channel list
type NickSorter ¶
type NickSorter []*User
NickSorter cast to an array of user pointers
func (NickSorter) Less ¶
func (a NickSorter) Less(i, j int) bool
Less checks if i is less than j to change position
func (NickSorter) Swap ¶
func (a NickSorter) Swap(i, j int)
Swap moves the position of two items in the list
type RenderHandlerFunc ¶
RenderHandlerFunc type for Exec callbacks
type Server ¶
type Server struct {
Gui *gocui.Gui
Client *ircClient.Conn
Channels []*Channel
Address string
Port string
SSL bool
User string
Password string
NickPassword string
Nick string
AltNick string
Version string
CurrentChannel string
InsecureSkipVerify bool
AutoConnect bool
// contains filtered or unexported fields
}
Server struct
func (*Server) AddChannel ¶
AddChannel to server channel list
func (*Server) ChannelView ¶
ChannelView returns a channel view by name or returns an error
func (*Server) FindChannel ¶
FindChannel in server channel list
func (*Server) GetCurrentChannel ¶
GetCurrentChannel will return the current channel in view
func (*Server) HasChannel ¶
HasChannel returns a channel if it exists in the server channel list
func (*Server) NewChannel ¶
NewChannel will create a channel and add it to the server list