Documentation
¶
Index ¶
- Constants
- func ClientStringCommand(s string) message.Buffer
- func ClientUserMessage(ui string) message.Buffer
- type Bot
- func (b *Bot) AddClientString(format string, args ...any)
- func (b *Bot) BuildUserCommand() message.Buffer
- func (bot *Bot) ClientCommand(str string, reliable bool) error
- func (bot *Bot) OutPending() bool
- func (bot *Bot) Receive() (int, error)
- func (b *Bot) RegisterCallback(index int, dofunc func(any, *message.Buffer))
- func (bot *Bot) ReliablePending() bool
- func (b *Bot) ResolveString(s string) string
- func (bot *Bot) Run() error
- func (bot *Bot) Send() error
- func (bot *Bot) SendAck() error
- func (b *Bot) UnregisterCallback(index int)
- type Connection
- type NetChan
Constants ¶
View Source
const ( MoveMask = 1 << 4 MaxMessageSize = 1390 LightLevel = 150 )
Variables ¶
This section is empty.
Functions ¶
func ClientStringCommand ¶ added in v1.0.298
func ClientUserMessage ¶ added in v1.0.298
Marshal a c2s userinfo update message
Types ¶
type Bot ¶
type Bot struct {
Net Connection
User pl.Userinfo
Version string
Netchan NetChan
Spawned bool
AckPending bool
Debug bool
FrameNum int
Aliases map[string]string
CVars map[string]string
Cmds map[string]func(*Bot, Cmd)
// contains filtered or unexported fields
}
func (*Bot) AddClientString ¶ added in v1.0.298
Add a client string to the bot's outgoing message buffer. This is how strings are sent from the bot to the server.
func (*Bot) BuildUserCommand ¶ added in v1.0.298
func (*Bot) RegisterCallback ¶ added in v1.0.233
func (*Bot) ReliablePending ¶
was a recently received msg reliable and needs an ack?
func (*Bot) ResolveString ¶ added in v1.0.298
Replace any variables and aliases with their substitutions. Aliases are not recursive.
func (*Bot) UnregisterCallback ¶ added in v1.0.233
type Connection ¶
Click to show internal directories.
Click to hide internal directories.