]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/transaction_handlers_test.go
Improve third party client compatability
[rbdr/mobius] / hotline / transaction_handlers_test.go
index cb9e21f301a117faf12188fd9e24b99b226c8baa..69dedf9e6e4ee47022deb312e1dc5b74f1bd9bcb 100644 (file)
@@ -232,21 +232,18 @@ func TestHandleGetUserNameList(t *testing.T) {
                                                                Icon:     []byte{0, 2},
                                                                Flags:    []byte{0, 3},
                                                                UserName: []byte{0, 4},
-                                                               Agreed:   true,
                                                        },
                                                        uint16(2): {
                                                                ID:       &[]byte{0, 2},
                                                                Icon:     []byte{0, 2},
                                                                Flags:    []byte{0, 3},
                                                                UserName: []byte{0, 4},
-                                                               Agreed:   true,
                                                        },
                                                        uint16(3): {
                                                                ID:       &[]byte{0, 3},
                                                                Icon:     []byte{0, 2},
                                                                Flags:    []byte{0, 3},
                                                                UserName: []byte{0, 4},
-                                                               Agreed:   false,
                                                        },
                                                },
                                        },
@@ -261,7 +258,7 @@ func TestHandleGetUserNameList(t *testing.T) {
                                        clientID:  &[]byte{1, 1},
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 1},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0, 0, 0, 1},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
@@ -363,6 +360,68 @@ func TestHandleChatSend(t *testing.T) {
                        },
                        wantErr: false,
                },
+               {
+                       name: "treats Chat ID 00 00 00 00 as a public chat message",
+                       args: args{
+                               cc: &ClientConn{
+                                       Account: &Account{
+                                               Access: func() accessBitmap {
+                                                       var bits accessBitmap
+                                                       bits.Set(accessSendChat)
+                                                       return bits
+                                               }(),
+                                       },
+                                       UserName: []byte{0x00, 0x01},
+                                       Server: &Server{
+                                               Clients: map[uint16]*ClientConn{
+                                                       uint16(1): {
+                                                               Account: &Account{
+                                                                       Access: accessBitmap{255, 255, 255, 255, 255, 255, 255, 255},
+                                                               },
+                                                               ID: &[]byte{0, 1},
+                                                       },
+                                                       uint16(2): {
+                                                               Account: &Account{
+                                                                       Access: accessBitmap{255, 255, 255, 255, 255, 255, 255, 255},
+                                                               },
+                                                               ID: &[]byte{0, 2},
+                                                       },
+                                               },
+                                       },
+                               },
+                               t: &Transaction{
+                                       Fields: []Field{
+                                               NewField(fieldData, []byte("hai")),
+                                               NewField(fieldChatID, []byte{0, 0, 0, 0}),
+                                       },
+                               },
+                       },
+                       want: []Transaction{
+                               {
+                                       clientID:  &[]byte{0, 1},
+                                       Flags:     0x00,
+                                       IsReply:   0x00,
+                                       Type:      []byte{0, 0x6a},
+                                       ID:        []byte{0x9a, 0xcb, 0x04, 0x42}, // Random ID from rand.Seed(1)
+                                       ErrorCode: []byte{0, 0, 0, 0},
+                                       Fields: []Field{
+                                               NewField(fieldData, []byte{0x0d, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x01, 0x3a, 0x20, 0x20, 0x68, 0x61, 0x69}),
+                                       },
+                               },
+                               {
+                                       clientID:  &[]byte{0, 2},
+                                       Flags:     0x00,
+                                       IsReply:   0x00,
+                                       Type:      []byte{0, 0x6a},
+                                       ID:        []byte{0xf0, 0xc5, 0x34, 0x1e}, // Random ID from rand.Seed(1)
+                                       ErrorCode: []byte{0, 0, 0, 0},
+                                       Fields: []Field{
+                                               NewField(fieldData, []byte{0x0d, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x01, 0x3a, 0x20, 0x20, 0x68, 0x61, 0x69}),
+                                       },
+                               },
+                       },
+                       wantErr: false,
+               },
                {
                        name: "when user does not have required permission",
                        args: args{
@@ -397,7 +456,7 @@ func TestHandleChatSend(t *testing.T) {
                        wantErr: false,
                },
                {
-                       name: "sends chat msg as emote if fieldChatOptions is set",
+                       name: "sends chat msg as emote if fieldChatOptions is set to 1",
                        args: args{
                                cc: &ClientConn{
                                        Account: &Account{
@@ -458,6 +517,68 @@ func TestHandleChatSend(t *testing.T) {
                        },
                        wantErr: false,
                },
+               {
+                       name: "does not send chat msg as emote if fieldChatOptions is set to 0",
+                       args: args{
+                               cc: &ClientConn{
+                                       Account: &Account{
+                                               Access: func() accessBitmap {
+                                                       var bits accessBitmap
+                                                       bits.Set(accessSendChat)
+                                                       return bits
+                                               }(),
+                                       },
+                                       UserName: []byte("Testy McTest"),
+                                       Server: &Server{
+                                               Clients: map[uint16]*ClientConn{
+                                                       uint16(1): {
+                                                               Account: &Account{
+                                                                       Access: accessBitmap{255, 255, 255, 255, 255, 255, 255, 255},
+                                                               },
+                                                               ID: &[]byte{0, 1},
+                                                       },
+                                                       uint16(2): {
+                                                               Account: &Account{
+                                                                       Access: accessBitmap{255, 255, 255, 255, 255, 255, 255, 255},
+                                                               },
+                                                               ID: &[]byte{0, 2},
+                                                       },
+                                               },
+                                       },
+                               },
+                               t: &Transaction{
+                                       Fields: []Field{
+                                               NewField(fieldData, []byte("hello")),
+                                               NewField(fieldChatOptions, []byte{0x00, 0x00}),
+                                       },
+                               },
+                       },
+                       want: []Transaction{
+                               {
+                                       clientID:  &[]byte{0, 1},
+                                       Flags:     0x00,
+                                       IsReply:   0x00,
+                                       Type:      []byte{0, 0x6a},
+                                       ID:        []byte{0x9a, 0xcb, 0x04, 0x42},
+                                       ErrorCode: []byte{0, 0, 0, 0},
+                                       Fields: []Field{
+                                               NewField(fieldData, []byte("\r Testy McTest:  hello")),
+                                       },
+                               },
+                               {
+                                       clientID:  &[]byte{0, 2},
+                                       Flags:     0x00,
+                                       IsReply:   0x00,
+                                       Type:      []byte{0, 0x6a},
+                                       ID:        []byte{0xf0, 0xc5, 0x34, 0x1e},
+                                       ErrorCode: []byte{0, 0, 0, 0},
+                                       Fields: []Field{
+                                               NewField(fieldData, []byte("\r Testy McTest:  hello")),
+                                       },
+                               },
+                       },
+                       wantErr: false,
+               },
                {
                        name: "only sends chat msg to clients with accessReadChat permission",
                        args: args{
@@ -646,7 +767,7 @@ func TestHandleGetFileInfo(t *testing.T) {
                                        clientID:  &[]byte{0, 1},
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0xce},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0x9a, 0xcb, 0x04, 0x42}, // Random ID from rand.Seed(1)
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
@@ -766,7 +887,7 @@ func TestHandleNewFolder(t *testing.T) {
                                        clientID:  &[]byte{0, 1},
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0xcd},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0x9a, 0xcb, 0x04, 0x42}, // Random ID from rand.Seed(1)
                                        ErrorCode: []byte{0, 0, 0, 0},
                                },
@@ -807,7 +928,7 @@ func TestHandleNewFolder(t *testing.T) {
                                        clientID:  &[]byte{0, 1},
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0xcd},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0x9a, 0xcb, 0x04, 0x42}, // Random ID from rand.Seed(1)
                                        ErrorCode: []byte{0, 0, 0, 0},
                                },
@@ -883,7 +1004,7 @@ func TestHandleNewFolder(t *testing.T) {
                                        clientID:  &[]byte{0, 1},
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0xcd},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0x9a, 0xcb, 0x04, 0x42}, // Random ID from rand.Seed(1)
                                        ErrorCode: []byte{0, 0, 0, 0},
                                },
@@ -932,7 +1053,7 @@ func TestHandleNewFolder(t *testing.T) {
                                        clientID:  &[]byte{0, 1},
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0xcd},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0x9a, 0xcb, 0x04, 0x42}, // Random ID from rand.Seed(1)
                                        ErrorCode: []byte{0, 0, 0, 0},
                                },
@@ -1003,7 +1124,7 @@ func TestHandleUploadFile(t *testing.T) {
                                {
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0xcb},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0x9a, 0xcb, 0x04, 0x42},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
@@ -1119,7 +1240,7 @@ func TestHandleMakeAlias(t *testing.T) {
                                {
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0xd1},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0x9a, 0xcb, 0x04, 0x42},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields:    []Field(nil),
@@ -1287,7 +1408,7 @@ func TestHandleGetUser(t *testing.T) {
                                {
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0x01, 0x60},
+                                       Type:      []byte{00},
                                        ID:        []byte{0x9a, 0xcb, 0x04, 0x42},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
@@ -1427,7 +1548,7 @@ func TestHandleDeleteUser(t *testing.T) {
                                {
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0x1, 0x5f},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0x9a, 0xcb, 0x04, 0x42},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields:    []Field(nil),
@@ -1515,7 +1636,7 @@ func TestHandleGetMsgs(t *testing.T) {
                                {
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0x65},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0x9a, 0xcb, 0x04, 0x42},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
@@ -1613,6 +1734,48 @@ func TestHandleNewUser(t *testing.T) {
                        },
                        wantErr: assert.NoError,
                },
+               {
+                       name: "when user attempts to create account with greater access",
+                       args: args{
+                               cc: &ClientConn{
+                                       Account: &Account{
+                                               Access: func() accessBitmap {
+                                                       var bits accessBitmap
+                                                       bits.Set(accessCreateUser)
+                                                       return bits
+                                               }(),
+                                       },
+                                       Server: &Server{
+                                               Accounts: map[string]*Account{},
+                                       },
+                               },
+                               t: NewTransaction(
+                                       tranNewUser, &[]byte{0, 1},
+                                       NewField(fieldUserLogin, []byte("userB")),
+                                       NewField(
+                                               fieldUserAccess,
+                                               func() []byte {
+                                                       var bits accessBitmap
+                                                       bits.Set(accessDisconUser)
+                                                       return bits[:]
+                                               }(),
+                                       ),
+                               ),
+                       },
+                       wantRes: []Transaction{
+                               {
+                                       Flags:     0x00,
+                                       IsReply:   0x01,
+                                       Type:      []byte{0, 0x00},
+                                       ID:        []byte{0x9a, 0xcb, 0x04, 0x42},
+                                       ErrorCode: []byte{0, 0, 0, 1},
+                                       Fields: []Field{
+                                               NewField(fieldError, []byte("Cannot create account with more access than yourself.")),
+                                       },
+                               },
+                       },
+                       wantErr: assert.NoError,
+               },
        }
        for _, tt := range tests {
                t.Run(tt.name, func(t *testing.T) {
@@ -1700,7 +1863,7 @@ func TestHandleListUsers(t *testing.T) {
                                {
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0x01, 0x2f},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0, 0, 0, 0},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
@@ -1800,7 +1963,7 @@ func TestHandleDownloadFile(t *testing.T) {
                                {
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0x2},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0x9a, 0xcb, 0x04, 0x42},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
@@ -1891,7 +2054,7 @@ func TestHandleDownloadFile(t *testing.T) {
                                {
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0x2},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0x9a, 0xcb, 0x04, 0x42},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
@@ -2302,6 +2465,7 @@ func TestHandleSendInstantMsg(t *testing.T) {
                                                Clients: map[uint16]*ClientConn{
                                                        uint16(2): {
                                                                AutoReply: []byte(nil),
+                                                               Flags:     []byte{0, 0},
                                                        },
                                                },
                                        },
@@ -2326,7 +2490,7 @@ func TestHandleSendInstantMsg(t *testing.T) {
                                        clientID:  &[]byte{0, 1},
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0x0, 0x6c},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0, 0, 0, 0},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields:    []Field(nil),
@@ -2350,6 +2514,7 @@ func TestHandleSendInstantMsg(t *testing.T) {
                                        Server: &Server{
                                                Clients: map[uint16]*ClientConn{
                                                        uint16(2): {
+                                                               Flags:     []byte{0, 0},
                                                                ID:        &[]byte{0, 2},
                                                                UserName:  []byte("User2"),
                                                                AutoReply: []byte("autohai"),
@@ -2385,7 +2550,58 @@ func TestHandleSendInstantMsg(t *testing.T) {
                                        clientID:  &[]byte{0, 1},
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0x0, 0x6c},
+                                       Type:      []byte{0, 0},
+                                       ID:        []byte{0, 0, 0, 0},
+                                       ErrorCode: []byte{0, 0, 0, 0},
+                                       Fields:    []Field(nil),
+                               },
+                       },
+                       wantErr: assert.NoError,
+               },
+               {
+                       name: "when client 2 has refuse private messages enabled",
+                       args: args{
+                               cc: &ClientConn{
+                                       Account: &Account{
+                                               Access: func() accessBitmap {
+                                                       var bits accessBitmap
+                                                       bits.Set(accessSendPrivMsg)
+                                                       return bits
+                                               }(),
+                                       },
+                                       ID:       &[]byte{0, 1},
+                                       UserName: []byte("User1"),
+                                       Server: &Server{
+                                               Clients: map[uint16]*ClientConn{
+                                                       uint16(2): {
+                                                               Flags:    []byte{255, 255},
+                                                               ID:       &[]byte{0, 2},
+                                                               UserName: []byte("User2"),
+                                                       },
+                                               },
+                                       },
+                               },
+                               t: NewTransaction(
+                                       tranSendInstantMsg,
+                                       &[]byte{0, 1},
+                                       NewField(fieldData, []byte("hai")),
+                                       NewField(fieldUserID, []byte{0, 2}),
+                               ),
+                       },
+                       wantRes: []Transaction{
+                               *NewTransaction(
+                                       tranServerMsg,
+                                       &[]byte{0, 1},
+                                       NewField(fieldData, []byte("User2 does not accept private messages.")),
+                                       NewField(fieldUserName, []byte("User2")),
+                                       NewField(fieldUserID, []byte{0, 2}),
+                                       NewField(fieldOptions, []byte{0, 2}),
+                               ),
+                               {
+                                       clientID:  &[]byte{0, 1},
+                                       Flags:     0x00,
+                                       IsReply:   0x01,
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0, 0, 0, 0},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields:    []Field(nil),
@@ -2531,7 +2747,7 @@ func TestHandleDeleteFile(t *testing.T) {
                                {
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0x0, 0xcc},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0x0, 0x0, 0x0, 0x0},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields:    []Field(nil),
@@ -2634,7 +2850,7 @@ func TestHandleGetFileNameList(t *testing.T) {
                                {
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0xc8},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0, 0, 0, 0},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
@@ -2767,7 +2983,7 @@ func TestHandleGetClientInfoText(t *testing.T) {
                                {
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0x1, 0x2f},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0, 0, 0, 0},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
@@ -2873,7 +3089,7 @@ func TestHandleTranAgreed(t *testing.T) {
                                        clientID:  &[]byte{0, 1},
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0x79},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0, 0, 0, 0},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields:    []Field{},
@@ -3110,7 +3326,7 @@ func TestHandleDelNewsItem(t *testing.T) {
                                        clientID:  &[]byte{0, 1},
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0x01, 0x7c},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0, 0, 0, 0},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields:    []Field{},
@@ -3172,7 +3388,7 @@ func TestHandleDownloadBanner(t *testing.T) {
                                        clientID:  &[]byte{0, 1},
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0x00, 0xd4},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0, 0, 0, 0},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
@@ -3267,7 +3483,7 @@ func TestHandleTranOldPostNews(t *testing.T) {
                                {
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0x67},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0, 0, 0, 0},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                },
@@ -3375,7 +3591,7 @@ func TestHandleInviteNewChat(t *testing.T) {
                                        clientID:  &[]byte{0, 1},
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0x70},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0, 0, 0, 0},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
@@ -3429,7 +3645,7 @@ func TestHandleInviteNewChat(t *testing.T) {
                                        ID:        []byte{0, 0, 0, 0},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
-                                               NewField(fieldData, []byte("UserB does not accept private messages.")),
+                                               NewField(fieldData, []byte("UserB does not accept private chats.")),
                                                NewField(fieldUserName, []byte("UserB")),
                                                NewField(fieldUserID, []byte{0, 2}),
                                                NewField(fieldOptions, []byte{0, 2}),
@@ -3439,7 +3655,7 @@ func TestHandleInviteNewChat(t *testing.T) {
                                        clientID:  &[]byte{0, 1},
                                        Flags:     0x00,
                                        IsReply:   0x01,
-                                       Type:      []byte{0, 0x70},
+                                       Type:      []byte{0, 0},
                                        ID:        []byte{0, 0, 0, 0},
                                        ErrorCode: []byte{0, 0, 0, 0},
                                        Fields: []Field{
@@ -3465,3 +3681,58 @@ func TestHandleInviteNewChat(t *testing.T) {
                })
        }
 }
+
+func TestHandleGetNewsArtData(t *testing.T) {
+       type args struct {
+               cc *ClientConn
+               t  *Transaction
+       }
+       tests := []struct {
+               name    string
+               args    args
+               wantRes []Transaction
+               wantErr assert.ErrorAssertionFunc
+       }{
+               {
+                       name: "when user does not have required permission",
+                       args: args{
+                               cc: &ClientConn{
+                                       Account: &Account{
+                                               Access: func() accessBitmap {
+                                                       var bits accessBitmap
+                                                       return bits
+                                               }(),
+                                       },
+                                       Server: &Server{
+                                               Accounts: map[string]*Account{},
+                                       },
+                               },
+                               t: NewTransaction(
+                                       tranGetNewsArtData, &[]byte{0, 1},
+                               ),
+                       },
+                       wantRes: []Transaction{
+                               {
+                                       Flags:     0x00,
+                                       IsReply:   0x01,
+                                       Type:      []byte{0, 0x00},
+                                       ID:        []byte{0x9a, 0xcb, 0x04, 0x42},
+                                       ErrorCode: []byte{0, 0, 0, 1},
+                                       Fields: []Field{
+                                               NewField(fieldError, []byte("You are not allowed to read news.")),
+                                       },
+                               },
+                       },
+                       wantErr: assert.NoError,
+               },
+       }
+       for _, tt := range tests {
+               t.Run(tt.name, func(t *testing.T) {
+                       gotRes, err := HandleGetNewsArtData(tt.args.cc, tt.args.t)
+                       if !tt.wantErr(t, err, fmt.Sprintf("HandleGetNewsArtData(%v, %v)", tt.args.cc, tt.args.t)) {
+                               return
+                       }
+                       tranAssertEqual(t, tt.wantRes, gotRes)
+               })
+       }
+}