Refactor: Simplify LoginClient, replace Account struct with strom.Account, add Ticker module, and enhance configuration handling
This commit is contained in:
@@ -1,7 +1,34 @@
|
||||
package modules
|
||||
|
||||
import "strom"
|
||||
import (
|
||||
"strom"
|
||||
|
||||
func IgnoreConfig(c *strom.Conn) (err error) {
|
||||
"github.com/admin-else/queser"
|
||||
"github.com/admin-else/queser/generated/v1_21_8"
|
||||
)
|
||||
|
||||
type ConfigIgnorer struct {
|
||||
*strom.Conn
|
||||
}
|
||||
|
||||
func (c *ConfigIgnorer) Default(event any) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (c *ConfigIgnorer) OnKnownPacks(packet v1_21_8.PacketCommonSelectKnownPacks) (err error) {
|
||||
return c.Send(packet)
|
||||
}
|
||||
|
||||
func (c *ConfigIgnorer) OnFinish(packet v1_21_8.ConfigurationToClientPacketFinishConfiguration) (err error) {
|
||||
err = c.Send(v1_21_8.ConfigurationToServerPacketFinishConfiguration{})
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
c.State = queser.Play
|
||||
err = strom.HandlerDone
|
||||
return
|
||||
}
|
||||
|
||||
func IgnoreConfig(c *strom.Conn) (err error) {
|
||||
return c.Start(&ConfigIgnorer{c})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user