Documentation ¶
Overview ¶
The GsBot package contains some useful utilites for working with the steam package. It implements authentication with sentries, server lists and logging messages and events.
Every module is optional and requires an instance of the GsBot struct. Should a module have a `HandlePacket` method, you must register it with the steam.Client with `RegisterPacketHandler`. Any module with a `HandleEvent` method must be integrated into your event loop and should be called for each event you receive.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
This module handles authentication. It logs on automatically after a ConnectedEvent and saves the sentry data to a file which is also used for logon if available. If you're logging on for the first time Steam may require an authcode. You can then connect again with the new logon details.
func (*Auth) HandleEvent ¶
func (a *Auth) HandleEvent(event interface{})
type Debug ¶
type Debug struct {
// contains filtered or unexported fields
}
This module logs incoming packets and events to a directory.
func (*Debug) HandleEvent ¶
func (d *Debug) HandleEvent(event interface{})
func (*Debug) HandlePacket ¶
type ServerList ¶
type ServerList struct {
// contains filtered or unexported fields
}
This module saves the server list from ClientCMListEvent and uses it when you call `Connect()`.
func NewServerList ¶
func NewServerList(bot *GsBot, listPath string) *ServerList
func (*ServerList) Connect ¶
func (s *ServerList) Connect() (bool, error)
func (*ServerList) ConnectBind ¶
func (s *ServerList) ConnectBind(laddr *net.TCPAddr) (bool, error)
func (*ServerList) HandleEvent ¶
func (s *ServerList) HandleEvent(event interface{})