MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / FastLogin

Method FastLogin

client/client.go:379–397  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

377}
378
379func (c *QQClient) FastLogin() error {
380 if c.transport.Sig.Uin == 0 || len(c.transport.Sig.D2) == 0 {
381 return errors.New("no login cache")
382 }
383 c.Uin = c.transport.Sig.Uin
384 if c.Online.Load() {
385 return ErrAlreadyOnline
386 }
387 err := c.connect()
388 if err != nil {
389 return err
390 }
391 err = c.register()
392 if err != nil {
393 return fmt.Errorf("failed to register session: %w", err)
394
395 }
396 return nil
397}
398
399func (c *QQClient) init() error {
400 return c.register()

Callers 1

mainFunction · 0.80

Calls 2

connectMethod · 0.95
registerMethod · 0.95

Tested by

no test coverage detected