]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/client.go
Fix tracker registration logging
[rbdr/mobius] / hotline / client.go
index e75f77bfe4a8a4c5db55c87d1bacb9ec57f7111c..e300bb8bb61485ea5d510353cb7a6a36b21e4734 100644 (file)
@@ -31,6 +31,7 @@ type Client struct {
        Pref        *ClientPrefs
        Handlers    map[[2]byte]ClientHandler
        activeTasks map[[4]byte]*Transaction
+       UserList    []User
 }
 
 type ClientHandler func(context.Context, *Client, *Transaction) ([]Transaction, error)
@@ -83,8 +84,8 @@ func (c *Client) Connect(address, login, passwd string) (err error) {
                        TranLogin, [2]byte{0, 0},
                        NewField(FieldUserName, []byte(c.Pref.Username)),
                        NewField(FieldUserIconID, c.Pref.IconBytes()),
-                       NewField(FieldUserLogin, encodeString([]byte(login))),
-                       NewField(FieldUserPassword, encodeString([]byte(passwd))),
+                       NewField(FieldUserLogin, EncodeString([]byte(login))),
+                       NewField(FieldUserPassword, EncodeString([]byte(passwd))),
                ),
        )
        if err != nil {
@@ -184,12 +185,6 @@ func (c *Client) HandleTransaction(ctx context.Context, t *Transaction) error {
                                return err
                        }
                }
-       } else {
-               c.Logger.Debug(
-                       "Unimplemented transaction type",
-                       "IsReply", t.IsReply,
-                       "type", t.Type[:],
-               )
        }
 
        return nil