Documentation ¶
Index ¶
- Variables
- type Channel
- type Client
- func (c *Client) Channel(channelName string) (*Channel, error)
- func (c *Client) Connect()
- func (c *Client) CreateLobby(name string) (*Channel, error)
- func (c *Client) Disconnect()
- func (c *Client) HandleIRCCommand(message string)
- func (c *Client) Listen()
- func (c *Client) ProcessMessageQueue() error
- func (c *Client) Self() *User
- func (c *Client) Send(message string)
- func (c *Client) User(username string) *User
- type Config
- type Lobby
- type Member
- type MemberMode
- type Message
- type OnMessageReceivedHandler
- type OutgoingMessage
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ Username: "", Password: "", Host: "irc.ppy.sh", Port: 6667, APIKey: "", BotAccount: false, }
View Source
var IgnoredSplits = []string{
"312",
"333",
"366",
"372",
"375",
"376",
}
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { Client *Client Name string Topic string Type enums.ChannelType IsJoined bool Members map[string]*Member Lobby *Lobby }
func NewChannel ¶
type Client ¶
type Client struct { Username string Password string Host string Port uint16 APIKey string BotAccount bool ConnectionState enums.ConnectionState Users map[string]*User Channels map[string]*Channel MessageQueue []*OutgoingMessage RateLimiter *rate.Limiter OnMessageReceived OnMessageReceivedHandler }
func (*Client) Disconnect ¶
func (c *Client) Disconnect()
func (*Client) HandleIRCCommand ¶
func (*Client) ProcessMessageQueue ¶
ProcessMessageQueue Process client messages
type Member ¶
type Member struct { Channel *Channel User *User Mode *MemberMode }
type MemberMode ¶
func NewMemberMode ¶
func NewMemberMode(letter, name string) *MemberMode
type Message ¶
type OnMessageReceivedHandler ¶
type OnMessageReceivedHandler func(*Client)
type OutgoingMessage ¶
type OutgoingMessage struct { Client *Client RecipientUser *User RecipientChannel *Channel Content string }
func NewOutgoingMessage ¶
func NewOutgoingMessage(client *Client, recipientUser *User, recipientChannel *Channel, content string) *OutgoingMessage
func (*OutgoingMessage) Send ¶
func (msg *OutgoingMessage) Send() error
type User ¶
type User struct { Client *Client IRCUsername string ID uint Username string Country string JoinDate *time.Time PerformancePoint float64 GlobalRank uint CountryRank uint TotalScore uint RankedScore uint Accuracy float64 Count300 uint Count100 uint Count50 uint PlayCount uint TotalSecondsPlayed uint Level float64 CountRankSS uint CountRankS uint CountRankA uint }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.