Documentation
¶
Index ¶
- type AntiCheat
- func (ac *AntiCheat) ClearAuth(identifiers ...string)
- func (ac *AntiCheat) GetBanHistory(name string, limit int) ([]string, error)
- func (ac *AntiCheat) IsBanned(accountID int32, ip, hwid string) (bool, string, int64, error)
- func (ac *AntiCheat) IssueBan(accountID int32, hours int, reason string, ip, hwid string) error
- func (ac *AntiCheat) LockAccount(accountID int32) error
- func (ac *AntiCheat) LogAttackSpeedViolation(accountID int32) bool
- func (ac *AntiCheat) LogDamageViolation(accountID int32, damage, maxDamage int32)
- func (ac *AntiCheat) LogInvalidItemViolation(accountID int32)
- func (ac *AntiCheat) LogInvalidTradeViolation(accountID int32, reason string)
- func (ac *AntiCheat) LogMovementViolation(accountID int32, distance int16, moveType byte)
- func (ac *AntiCheat) LogSkillAbuseViolation(accountID int32, skillID int32)
- func (ac *AntiCheat) SetOnBan(fn func(accountID int32))
- func (ac *AntiCheat) StartCleanup()
- func (ac *AntiCheat) Track(accountID int32, violationType string, threshold int, window time.Duration) bool
- func (ac *AntiCheat) TrackFailedAuth(identifier string) bool
- func (ac *AntiCheat) Unban(name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AntiCheat ¶
type AntiCheat struct {
// contains filtered or unexported fields
}
func (*AntiCheat) GetBanHistory ¶
GetBanHistory returns recent ban records (resolved by player name)
func (*AntiCheat) LockAccount ¶
func (*AntiCheat) LogAttackSpeedViolation ¶
func (*AntiCheat) LogDamageViolation ¶
Detection helpers - track violations and auto-ban on threshold
func (*AntiCheat) LogInvalidItemViolation ¶
func (*AntiCheat) LogInvalidTradeViolation ¶
func (*AntiCheat) LogMovementViolation ¶
func (*AntiCheat) LogSkillAbuseViolation ¶
func (*AntiCheat) StartCleanup ¶
func (ac *AntiCheat) StartCleanup()
StartCleanup starts periodic cleanup of old violations/auth entries
func (*AntiCheat) Track ¶
func (ac *AntiCheat) Track(accountID int32, violationType string, threshold int, window time.Duration) bool
Track a violation - returns true if threshold exceeded and player should be banned
func (*AntiCheat) TrackFailedAuth ¶
Track failed auth attempt - returns true if should ban
Click to show internal directories.
Click to hide internal directories.