Refactor: Simplify LoginClient, replace Account struct with strom.Account, add Ticker module, and enhance configuration handling

This commit is contained in:
adman
2025-11-26 22:24:47 +01:00
parent 4f5b6441c8
commit 978555bf10
9 changed files with 306 additions and 74 deletions
+29 -2
View File
@@ -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})
}