addon

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PublicKey = []byte{}/* 256 elements not displayed */

Functions

This section is empty.

Types

type Info

type Info struct {
	Name         string
	HasKey       bool
	PublicKeyCRC uint32
	UrlCRC       uint32
}

func (*Info) Decode

func (ai *Info) Decode(build vsn.Build, in *packet.WorldPacket) error

type List

type List struct {
	Addons                   []Info
	LastBannedAddOnTimestamp uint32
}

func (*List) Decode

func (list *List) Decode(build vsn.Build, in *packet.WorldPacket) error

func (*List) Encode

func (list *List) Encode(build vsn.Build, out *packet.WorldPacket) error

type ServerAllowed

type ServerAllowed struct {
	State       ServerState
	ProvideInfo bool
	NeedsKey    bool
	Revision    uint32 // Revision (from .toc), can be used by AddonSecureVisible to display "update available" in client addon controls
	URL         string
}

type ServerBanned

type ServerBanned struct {
	ID         uint32
	NameMD5    [16]byte
	VersionMD5 [16]byte
	Timestamp  uint32
	// Really? (maybe ServerBanned isn't the right name?)
	IsBanned uint32
}

type ServerResponse

type ServerResponse struct {
	Allowed []ServerAllowed
	Banned  []ServerBanned
}

func SkipServerCheck

func SkipServerCheck(build vsn.Build, info *List) *ServerResponse

This function is merely to skip addon checking. It's only here to get the client to connect. Not a proper implementation of actually banning addons designated as harmful. A proper implementation may be added soon™

func (*ServerResponse) Decode

func (sar *ServerResponse) Decode(build vsn.Build, out *packet.WorldPacket) error

func (*ServerResponse) Encode

func (sar *ServerResponse) Encode(build vsn.Build, out *packet.WorldPacket) error

type ServerState

type ServerState uint8
const (
	StateBanned ServerState = iota
	StateSecureVisible
	StateSecureHidden
)

Jump to

Keyboard shortcuts

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