diff --git a/database/frienddb.sql b/database/frienddb.sql index 76ebea8c..f14cc19f 100644 --- a/database/frienddb.sql +++ b/database/frienddb.sql @@ -23,12 +23,12 @@ UNIQUE KEY `friendship` (`account1_id`,`account2_id`) COMMENT "已经成为好友" ; -drop table if exists `t_friend_pending_requests`; -CREATE TABLE t_friend_pending_requests ( +drop table if exists `t_friend_pending_request`; +CREATE TABLE t_friend_pending_request ( `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', sender_account_id varchar(60) NOT NULL DEFAULT '', receiver_account_id varchar(60) NOT NULL DEFAULT '', -flag tinyint DEFAULT '0' COMMENT '0 pending, 1 ok', +is_friendship tinyint DEFAULT '0' COMMENT '已经是好友关系, 0 pending, 1 ok, 2 no', `createtime` int NOT NULL DEFAULT '0' COMMENT '创建时间', `modifytime` int NOT NULL DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`idx`), diff --git a/server/imserver/cs/cs_proto.pb.go b/server/imserver/cs/cs_proto.pb.go index 82a3e323..de6eec33 100644 --- a/server/imserver/cs/cs_proto.pb.go +++ b/server/imserver/cs/cs_proto.pb.go @@ -851,7 +851,7 @@ type CMSearchUserByAccountId struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SearchKeyword *string `protobuf:"bytes,1,opt,name=search_keyword,json=searchKeyword" json:"search_keyword,omitempty"` //搜索account id + AccountId *string `protobuf:"bytes,1,opt,name=account_id,json=accountId" json:"account_id,omitempty"` //搜索account id } func (x *CMSearchUserByAccountId) Reset() { @@ -886,9 +886,9 @@ func (*CMSearchUserByAccountId) Descriptor() ([]byte, []int) { return file_cs_proto_proto_rawDescGZIP(), []int{13} } -func (x *CMSearchUserByAccountId) GetSearchKeyword() string { - if x != nil && x.SearchKeyword != nil { - return *x.SearchKeyword +func (x *CMSearchUserByAccountId) GetAccountId() string { + if x != nil && x.AccountId != nil { + return *x.AccountId } return "" } @@ -1306,7 +1306,7 @@ type SMListPendingFriendRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PendingFriendRequest []*MFPendingFriendRequest `protobuf:"bytes,1,rep,name=pendingFriendRequest" json:"pendingFriendRequest,omitempty"` + AccountIds []string `protobuf:"bytes,1,rep,name=accountIds" json:"accountIds,omitempty"` } func (x *SMListPendingFriendRequest) Reset() { @@ -1341,9 +1341,9 @@ func (*SMListPendingFriendRequest) Descriptor() ([]byte, []int) { return file_cs_proto_proto_rawDescGZIP(), []int{22} } -func (x *SMListPendingFriendRequest) GetPendingFriendRequest() []*MFPendingFriendRequest { +func (x *SMListPendingFriendRequest) GetAccountIds() []string { if x != nil { - return x.PendingFriendRequest + return x.AccountIds } return nil } @@ -1594,61 +1594,6 @@ func (x *MFUser) GetUsername() string { return "" } -type MFPendingFriendRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AccountId *string `protobuf:"bytes,1,opt,name=account_id,json=accountId" json:"account_id,omitempty"` - Flag *bool `protobuf:"varint,2,opt,name=flag" json:"flag,omitempty"` -} - -func (x *MFPendingFriendRequest) Reset() { - *x = MFPendingFriendRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MFPendingFriendRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MFPendingFriendRequest) ProtoMessage() {} - -func (x *MFPendingFriendRequest) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MFPendingFriendRequest.ProtoReflect.Descriptor instead. -func (*MFPendingFriendRequest) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{28} -} - -func (x *MFPendingFriendRequest) GetAccountId() string { - if x != nil && x.AccountId != nil { - return *x.AccountId - } - return "" -} - -func (x *MFPendingFriendRequest) GetFlag() bool { - if x != nil && x.Flag != nil { - return *x.Flag - } - return false -} - // 请求公会信息 type CMGuildInfo struct { state protoimpl.MessageState @@ -1659,7 +1604,7 @@ type CMGuildInfo struct { func (x *CMGuildInfo) Reset() { *x = CMGuildInfo{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[29] + mi := &file_cs_proto_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1672,7 +1617,7 @@ func (x *CMGuildInfo) String() string { func (*CMGuildInfo) ProtoMessage() {} func (x *CMGuildInfo) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[29] + mi := &file_cs_proto_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1685,7 +1630,7 @@ func (x *CMGuildInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use CMGuildInfo.ProtoReflect.Descriptor instead. func (*CMGuildInfo) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{29} + return file_cs_proto_proto_rawDescGZIP(), []int{28} } // 回复公会信息 @@ -1701,7 +1646,7 @@ type SMGuildInfo struct { func (x *SMGuildInfo) Reset() { *x = SMGuildInfo{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[30] + mi := &file_cs_proto_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1714,7 +1659,7 @@ func (x *SMGuildInfo) String() string { func (*SMGuildInfo) ProtoMessage() {} func (x *SMGuildInfo) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[30] + mi := &file_cs_proto_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1727,7 +1672,7 @@ func (x *SMGuildInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use SMGuildInfo.ProtoReflect.Descriptor instead. func (*SMGuildInfo) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{30} + return file_cs_proto_proto_rawDescGZIP(), []int{29} } func (x *SMGuildInfo) GetCurrGuild() *MFGuild { @@ -1756,7 +1701,7 @@ type CMCreateGuild struct { func (x *CMCreateGuild) Reset() { *x = CMCreateGuild{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[31] + mi := &file_cs_proto_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1769,7 +1714,7 @@ func (x *CMCreateGuild) String() string { func (*CMCreateGuild) ProtoMessage() {} func (x *CMCreateGuild) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[31] + mi := &file_cs_proto_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1782,7 +1727,7 @@ func (x *CMCreateGuild) ProtoReflect() protoreflect.Message { // Deprecated: Use CMCreateGuild.ProtoReflect.Descriptor instead. func (*CMCreateGuild) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{31} + return file_cs_proto_proto_rawDescGZIP(), []int{30} } func (x *CMCreateGuild) GetName() string { @@ -1805,7 +1750,7 @@ type SMCreateGuild struct { func (x *SMCreateGuild) Reset() { *x = SMCreateGuild{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[32] + mi := &file_cs_proto_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1818,7 +1763,7 @@ func (x *SMCreateGuild) String() string { func (*SMCreateGuild) ProtoMessage() {} func (x *SMCreateGuild) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[32] + mi := &file_cs_proto_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1831,7 +1776,7 @@ func (x *SMCreateGuild) ProtoReflect() protoreflect.Message { // Deprecated: Use SMCreateGuild.ProtoReflect.Descriptor instead. func (*SMCreateGuild) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{32} + return file_cs_proto_proto_rawDescGZIP(), []int{31} } func (x *SMCreateGuild) GetGuildId() int64 { @@ -1860,7 +1805,7 @@ type CMApplyToGuild struct { func (x *CMApplyToGuild) Reset() { *x = CMApplyToGuild{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[33] + mi := &file_cs_proto_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1873,7 +1818,7 @@ func (x *CMApplyToGuild) String() string { func (*CMApplyToGuild) ProtoMessage() {} func (x *CMApplyToGuild) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[33] + mi := &file_cs_proto_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1886,7 +1831,7 @@ func (x *CMApplyToGuild) ProtoReflect() protoreflect.Message { // Deprecated: Use CMApplyToGuild.ProtoReflect.Descriptor instead. func (*CMApplyToGuild) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{33} + return file_cs_proto_proto_rawDescGZIP(), []int{32} } func (x *CMApplyToGuild) GetGuildId() int64 { @@ -1908,7 +1853,7 @@ type SMApplyToGuild struct { func (x *SMApplyToGuild) Reset() { *x = SMApplyToGuild{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[34] + mi := &file_cs_proto_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1921,7 +1866,7 @@ func (x *SMApplyToGuild) String() string { func (*SMApplyToGuild) ProtoMessage() {} func (x *SMApplyToGuild) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[34] + mi := &file_cs_proto_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1934,7 +1879,7 @@ func (x *SMApplyToGuild) ProtoReflect() protoreflect.Message { // Deprecated: Use SMApplyToGuild.ProtoReflect.Descriptor instead. func (*SMApplyToGuild) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{34} + return file_cs_proto_proto_rawDescGZIP(), []int{33} } func (x *SMApplyToGuild) GetErrMsg() string { @@ -1957,7 +1902,7 @@ type CMApprove struct { func (x *CMApprove) Reset() { *x = CMApprove{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[35] + mi := &file_cs_proto_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1970,7 +1915,7 @@ func (x *CMApprove) String() string { func (*CMApprove) ProtoMessage() {} func (x *CMApprove) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[35] + mi := &file_cs_proto_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1983,7 +1928,7 @@ func (x *CMApprove) ProtoReflect() protoreflect.Message { // Deprecated: Use CMApprove.ProtoReflect.Descriptor instead. func (*CMApprove) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{35} + return file_cs_proto_proto_rawDescGZIP(), []int{34} } func (x *CMApprove) GetGuildId() int64 { @@ -2012,7 +1957,7 @@ type SMApprove struct { func (x *SMApprove) Reset() { *x = SMApprove{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[36] + mi := &file_cs_proto_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2025,7 +1970,7 @@ func (x *SMApprove) String() string { func (*SMApprove) ProtoMessage() {} func (x *SMApprove) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[36] + mi := &file_cs_proto_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2038,7 +1983,7 @@ func (x *SMApprove) ProtoReflect() protoreflect.Message { // Deprecated: Use SMApprove.ProtoReflect.Descriptor instead. func (*SMApprove) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{36} + return file_cs_proto_proto_rawDescGZIP(), []int{35} } func (x *SMApprove) GetErrMsg() string { @@ -2061,7 +2006,7 @@ type CMReject struct { func (x *CMReject) Reset() { *x = CMReject{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[37] + mi := &file_cs_proto_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2074,7 +2019,7 @@ func (x *CMReject) String() string { func (*CMReject) ProtoMessage() {} func (x *CMReject) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[37] + mi := &file_cs_proto_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2087,7 +2032,7 @@ func (x *CMReject) ProtoReflect() protoreflect.Message { // Deprecated: Use CMReject.ProtoReflect.Descriptor instead. func (*CMReject) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{37} + return file_cs_proto_proto_rawDescGZIP(), []int{36} } func (x *CMReject) GetGuildId() int64 { @@ -2116,7 +2061,7 @@ type SMReject struct { func (x *SMReject) Reset() { *x = SMReject{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[38] + mi := &file_cs_proto_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2129,7 +2074,7 @@ func (x *SMReject) String() string { func (*SMReject) ProtoMessage() {} func (x *SMReject) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[38] + mi := &file_cs_proto_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2142,7 +2087,7 @@ func (x *SMReject) ProtoReflect() protoreflect.Message { // Deprecated: Use SMReject.ProtoReflect.Descriptor instead. func (*SMReject) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{38} + return file_cs_proto_proto_rawDescGZIP(), []int{37} } func (x *SMReject) GetErrMsg() string { @@ -2164,7 +2109,7 @@ type CMLeaveGuild struct { func (x *CMLeaveGuild) Reset() { *x = CMLeaveGuild{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[39] + mi := &file_cs_proto_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2177,7 +2122,7 @@ func (x *CMLeaveGuild) String() string { func (*CMLeaveGuild) ProtoMessage() {} func (x *CMLeaveGuild) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[39] + mi := &file_cs_proto_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2190,7 +2135,7 @@ func (x *CMLeaveGuild) ProtoReflect() protoreflect.Message { // Deprecated: Use CMLeaveGuild.ProtoReflect.Descriptor instead. func (*CMLeaveGuild) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{39} + return file_cs_proto_proto_rawDescGZIP(), []int{38} } func (x *CMLeaveGuild) GetGuildId() int64 { @@ -2212,7 +2157,7 @@ type SMLeaveGuild struct { func (x *SMLeaveGuild) Reset() { *x = SMLeaveGuild{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[40] + mi := &file_cs_proto_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2225,7 +2170,7 @@ func (x *SMLeaveGuild) String() string { func (*SMLeaveGuild) ProtoMessage() {} func (x *SMLeaveGuild) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[40] + mi := &file_cs_proto_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2238,7 +2183,7 @@ func (x *SMLeaveGuild) ProtoReflect() protoreflect.Message { // Deprecated: Use SMLeaveGuild.ProtoReflect.Descriptor instead. func (*SMLeaveGuild) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{40} + return file_cs_proto_proto_rawDescGZIP(), []int{39} } func (x *SMLeaveGuild) GetErrMsg() string { @@ -2261,7 +2206,7 @@ type CMDismissMember struct { func (x *CMDismissMember) Reset() { *x = CMDismissMember{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[41] + mi := &file_cs_proto_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2274,7 +2219,7 @@ func (x *CMDismissMember) String() string { func (*CMDismissMember) ProtoMessage() {} func (x *CMDismissMember) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[41] + mi := &file_cs_proto_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2287,7 +2232,7 @@ func (x *CMDismissMember) ProtoReflect() protoreflect.Message { // Deprecated: Use CMDismissMember.ProtoReflect.Descriptor instead. func (*CMDismissMember) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{41} + return file_cs_proto_proto_rawDescGZIP(), []int{40} } func (x *CMDismissMember) GetGuildId() int64 { @@ -2316,7 +2261,7 @@ type SMDismissMember struct { func (x *SMDismissMember) Reset() { *x = SMDismissMember{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[42] + mi := &file_cs_proto_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2329,7 +2274,7 @@ func (x *SMDismissMember) String() string { func (*SMDismissMember) ProtoMessage() {} func (x *SMDismissMember) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[42] + mi := &file_cs_proto_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2342,7 +2287,7 @@ func (x *SMDismissMember) ProtoReflect() protoreflect.Message { // Deprecated: Use SMDismissMember.ProtoReflect.Descriptor instead. func (*SMDismissMember) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{42} + return file_cs_proto_proto_rawDescGZIP(), []int{41} } func (x *SMDismissMember) GetErrMsg() string { @@ -2365,7 +2310,7 @@ type CMPromoteMember struct { func (x *CMPromoteMember) Reset() { *x = CMPromoteMember{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[43] + mi := &file_cs_proto_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2378,7 +2323,7 @@ func (x *CMPromoteMember) String() string { func (*CMPromoteMember) ProtoMessage() {} func (x *CMPromoteMember) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[43] + mi := &file_cs_proto_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2391,7 +2336,7 @@ func (x *CMPromoteMember) ProtoReflect() protoreflect.Message { // Deprecated: Use CMPromoteMember.ProtoReflect.Descriptor instead. func (*CMPromoteMember) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{43} + return file_cs_proto_proto_rawDescGZIP(), []int{42} } func (x *CMPromoteMember) GetGuildId() int64 { @@ -2420,7 +2365,7 @@ type SMPromoteMember struct { func (x *SMPromoteMember) Reset() { *x = SMPromoteMember{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[44] + mi := &file_cs_proto_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2433,7 +2378,7 @@ func (x *SMPromoteMember) String() string { func (*SMPromoteMember) ProtoMessage() {} func (x *SMPromoteMember) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[44] + mi := &file_cs_proto_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2446,7 +2391,7 @@ func (x *SMPromoteMember) ProtoReflect() protoreflect.Message { // Deprecated: Use SMPromoteMember.ProtoReflect.Descriptor instead. func (*SMPromoteMember) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{44} + return file_cs_proto_proto_rawDescGZIP(), []int{43} } func (x *SMPromoteMember) GetErrMsg() string { @@ -2469,7 +2414,7 @@ type CMDemoteMember struct { func (x *CMDemoteMember) Reset() { *x = CMDemoteMember{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[45] + mi := &file_cs_proto_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2482,7 +2427,7 @@ func (x *CMDemoteMember) String() string { func (*CMDemoteMember) ProtoMessage() {} func (x *CMDemoteMember) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[45] + mi := &file_cs_proto_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2495,7 +2440,7 @@ func (x *CMDemoteMember) ProtoReflect() protoreflect.Message { // Deprecated: Use CMDemoteMember.ProtoReflect.Descriptor instead. func (*CMDemoteMember) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{45} + return file_cs_proto_proto_rawDescGZIP(), []int{44} } func (x *CMDemoteMember) GetGuildId() int64 { @@ -2524,7 +2469,7 @@ type SMDemoteMember struct { func (x *SMDemoteMember) Reset() { *x = SMDemoteMember{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[46] + mi := &file_cs_proto_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2537,7 +2482,7 @@ func (x *SMDemoteMember) String() string { func (*SMDemoteMember) ProtoMessage() {} func (x *SMDemoteMember) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[46] + mi := &file_cs_proto_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2550,7 +2495,7 @@ func (x *SMDemoteMember) ProtoReflect() protoreflect.Message { // Deprecated: Use SMDemoteMember.ProtoReflect.Descriptor instead. func (*SMDemoteMember) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{46} + return file_cs_proto_proto_rawDescGZIP(), []int{45} } func (x *SMDemoteMember) GetErrMsg() string { @@ -2572,7 +2517,7 @@ type CMDisband struct { func (x *CMDisband) Reset() { *x = CMDisband{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[47] + mi := &file_cs_proto_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2585,7 +2530,7 @@ func (x *CMDisband) String() string { func (*CMDisband) ProtoMessage() {} func (x *CMDisband) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[47] + mi := &file_cs_proto_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2598,7 +2543,7 @@ func (x *CMDisband) ProtoReflect() protoreflect.Message { // Deprecated: Use CMDisband.ProtoReflect.Descriptor instead. func (*CMDisband) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{47} + return file_cs_proto_proto_rawDescGZIP(), []int{46} } func (x *CMDisband) GetGuildId() int64 { @@ -2620,7 +2565,7 @@ type SMDisband struct { func (x *SMDisband) Reset() { *x = SMDisband{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[48] + mi := &file_cs_proto_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2633,7 +2578,7 @@ func (x *SMDisband) String() string { func (*SMDisband) ProtoMessage() {} func (x *SMDisband) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[48] + mi := &file_cs_proto_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2646,7 +2591,7 @@ func (x *SMDisband) ProtoReflect() protoreflect.Message { // Deprecated: Use SMDisband.ProtoReflect.Descriptor instead. func (*SMDisband) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{48} + return file_cs_proto_proto_rawDescGZIP(), []int{47} } func (x *SMDisband) GetErrMsg() string { @@ -2668,7 +2613,7 @@ type CMSearchGuilds struct { func (x *CMSearchGuilds) Reset() { *x = CMSearchGuilds{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[49] + mi := &file_cs_proto_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2681,7 +2626,7 @@ func (x *CMSearchGuilds) String() string { func (*CMSearchGuilds) ProtoMessage() {} func (x *CMSearchGuilds) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[49] + mi := &file_cs_proto_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2694,7 +2639,7 @@ func (x *CMSearchGuilds) ProtoReflect() protoreflect.Message { // Deprecated: Use CMSearchGuilds.ProtoReflect.Descriptor instead. func (*CMSearchGuilds) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{49} + return file_cs_proto_proto_rawDescGZIP(), []int{48} } func (x *CMSearchGuilds) GetKeyword() string { @@ -2716,7 +2661,7 @@ type SMSearchGuilds struct { func (x *SMSearchGuilds) Reset() { *x = SMSearchGuilds{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[50] + mi := &file_cs_proto_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2729,7 +2674,7 @@ func (x *SMSearchGuilds) String() string { func (*SMSearchGuilds) ProtoMessage() {} func (x *SMSearchGuilds) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[50] + mi := &file_cs_proto_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2742,7 +2687,7 @@ func (x *SMSearchGuilds) ProtoReflect() protoreflect.Message { // Deprecated: Use SMSearchGuilds.ProtoReflect.Descriptor instead. func (*SMSearchGuilds) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{50} + return file_cs_proto_proto_rawDescGZIP(), []int{49} } func (x *SMSearchGuilds) GetGuilds() []*MFGuild { @@ -2767,7 +2712,7 @@ type MFGuild struct { func (x *MFGuild) Reset() { *x = MFGuild{} if protoimpl.UnsafeEnabled { - mi := &file_cs_proto_proto_msgTypes[51] + mi := &file_cs_proto_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2780,7 +2725,7 @@ func (x *MFGuild) String() string { func (*MFGuild) ProtoMessage() {} func (x *MFGuild) ProtoReflect() protoreflect.Message { - mi := &file_cs_proto_proto_msgTypes[51] + mi := &file_cs_proto_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2793,7 +2738,7 @@ func (x *MFGuild) ProtoReflect() protoreflect.Message { // Deprecated: Use MFGuild.ProtoReflect.Descriptor instead. func (*MFGuild) Descriptor() ([]byte, []int) { - return file_cs_proto_proto_rawDescGZIP(), []int{51} + return file_cs_proto_proto_rawDescGZIP(), []int{50} } func (x *MFGuild) GetGuildId() int64 { @@ -2900,162 +2845,154 @@ var file_cs_proto_proto_rawDesc = []byte{ 0x77, 0x6f, 0x72, 0x64, 0x22, 0x30, 0x0a, 0x0c, 0x53, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x40, 0x0a, 0x17, 0x43, 0x4d, 0x53, 0x65, 0x61, 0x72, + 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x38, 0x0a, 0x17, 0x43, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x77, - 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x4b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x54, 0x0a, 0x17, 0x53, 0x4d, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x40, - 0x0a, 0x12, 0x43, 0x4d, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, + 0x22, 0x54, 0x0a, 0x17, 0x53, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, + 0x42, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, - 0x22, 0x44, 0x0a, 0x12, 0x53, 0x4d, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x4d, 0x41, 0x63, 0x63, 0x65, - 0x70, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x15, 0x53, - 0x4d, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, - 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x15, 0x53, 0x4d, 0x52, - 0x65, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x6c, 0x0a, 0x1a, 0x53, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, - 0x0a, 0x14, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, - 0x73, 0x2e, 0x4d, 0x46, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x14, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, - 0x0a, 0x0c, 0x43, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x30, - 0x0a, 0x0c, 0x53, 0x4d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x20, - 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, - 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, - 0x22, 0x40, 0x0a, 0x12, 0x43, 0x4d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x53, 0x68, 0x69, 0x70, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x22, 0x44, 0x0a, 0x12, 0x53, 0x4d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x53, 0x68, 0x69, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x43, 0x0a, 0x06, 0x4d, 0x46, 0x55, 0x73, - 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4b, 0x0a, - 0x16, 0x4d, 0x46, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x22, 0x0d, 0x0a, 0x0b, 0x43, 0x4d, - 0x47, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x6b, 0x0a, 0x0b, 0x53, 0x4d, 0x47, - 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2a, 0x0a, 0x0a, 0x63, 0x75, 0x72, 0x72, - 0x5f, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, - 0x73, 0x2e, 0x4d, 0x46, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x09, 0x63, 0x75, 0x72, 0x72, 0x47, - 0x75, 0x69, 0x6c, 0x64, 0x12, 0x30, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x67, - 0x75, 0x69, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, 0x73, - 0x2e, 0x4d, 0x46, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, - 0x47, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x22, 0x23, 0x0a, 0x0d, 0x43, 0x4d, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x43, 0x0a, 0x0d, 0x53, - 0x4d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, - 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, - 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, - 0x22, 0x2b, 0x0a, 0x0e, 0x43, 0x4d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x47, 0x75, 0x69, - 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x29, 0x0a, - 0x0e, 0x53, 0x4d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, - 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x58, 0x0a, 0x09, 0x43, 0x4d, 0x41, 0x70, - 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, - 0x12, 0x30, 0x0a, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x5f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x22, 0x24, 0x0a, 0x09, 0x53, 0x4d, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, - 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x57, 0x0a, 0x08, 0x43, 0x4d, 0x52, 0x65, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, - 0x30, 0x0a, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x64, 0x22, 0x23, 0x0a, 0x08, 0x53, 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, - 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x29, 0x0a, 0x0c, 0x43, 0x4d, 0x4c, 0x65, 0x61, 0x76, - 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, - 0x64, 0x22, 0x27, 0x0a, 0x0c, 0x53, 0x4d, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x75, 0x69, 0x6c, - 0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x58, 0x0a, 0x0f, 0x43, 0x4d, - 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x40, 0x0a, 0x12, 0x43, 0x4d, 0x41, 0x64, 0x64, 0x46, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x12, 0x53, 0x4d, 0x41, 0x64, + 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x43, + 0x0a, 0x15, 0x43, 0x4d, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x15, 0x53, 0x4d, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x46, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x43, 0x0a, 0x15, + 0x43, 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x22, 0x47, 0x0a, 0x15, 0x53, 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x4d, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3c, 0x0a, 0x1a, 0x53, 0x4d, 0x4c, 0x69, + 0x73, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x22, 0x0e, 0x0a, 0x0c, 0x43, 0x4d, 0x4c, 0x69, 0x73, 0x74, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x30, 0x0a, 0x0c, 0x53, 0x4d, 0x4c, 0x69, 0x73, 0x74, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x40, 0x0a, 0x12, 0x43, 0x4d, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x68, 0x69, 0x70, 0x12, 0x2a, + 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x12, 0x53, 0x4d, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x68, 0x69, 0x70, + 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x22, 0x43, 0x0a, 0x06, 0x4d, 0x46, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x43, 0x4d, 0x47, 0x75, 0x69, 0x6c, 0x64, + 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x6b, 0x0a, 0x0b, 0x53, 0x4d, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x2a, 0x0a, 0x0a, 0x63, 0x75, 0x72, 0x72, 0x5f, 0x67, 0x75, 0x69, 0x6c, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x47, + 0x75, 0x69, 0x6c, 0x64, 0x52, 0x09, 0x63, 0x75, 0x72, 0x72, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, + 0x30, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x47, 0x75, + 0x69, 0x6c, 0x64, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x47, 0x75, 0x69, 0x6c, 0x64, + 0x73, 0x22, 0x23, 0x0a, 0x0d, 0x43, 0x4d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x69, + 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x43, 0x0a, 0x0d, 0x53, 0x4d, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, + 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x2b, 0x0a, 0x0e, 0x43, + 0x4d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x64, 0x69, 0x73, 0x6d, - 0x69, 0x73, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x64, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x0f, 0x53, 0x4d, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, - 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, - 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, - 0x22, 0x58, 0x0a, 0x0f, 0x43, 0x4d, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x2a, - 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x0f, 0x53, 0x4d, - 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, - 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x55, 0x0a, 0x0e, 0x43, 0x4d, 0x44, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, + 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0e, 0x53, 0x4d, 0x41, 0x70, + 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, + 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, + 0x4d, 0x73, 0x67, 0x22, 0x58, 0x0a, 0x09, 0x43, 0x4d, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, + 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x24, 0x0a, + 0x09, 0x53, 0x4d, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, + 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, + 0x4d, 0x73, 0x67, 0x22, 0x57, 0x0a, 0x08, 0x43, 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x23, 0x0a, 0x08, + 0x53, 0x4d, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, + 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, + 0x67, 0x22, 0x29, 0x0a, 0x0c, 0x43, 0x4d, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x75, 0x69, 0x6c, + 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x27, 0x0a, 0x0c, + 0x53, 0x4d, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x17, 0x0a, 0x07, + 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, + 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x58, 0x0a, 0x0f, 0x43, 0x4d, 0x44, 0x69, 0x73, 0x6d, 0x69, + 0x73, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, - 0x64, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x29, 0x0a, - 0x0e, 0x53, 0x4d, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x26, 0x0a, 0x09, 0x43, 0x4d, 0x44, 0x69, - 0x73, 0x62, 0x61, 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, - 0x22, 0x24, 0x0a, 0x09, 0x53, 0x4d, 0x44, 0x69, 0x73, 0x62, 0x61, 0x6e, 0x64, 0x12, 0x17, 0x0a, - 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x2a, 0x0a, 0x0e, 0x43, 0x4d, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, - 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, - 0x72, 0x64, 0x22, 0x35, 0x0a, 0x0e, 0x53, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x47, 0x75, - 0x69, 0x6c, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x47, 0x75, 0x69, 0x6c, - 0x64, 0x52, 0x06, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x07, 0x4d, 0x46, - 0x47, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, - 0x61, 0x78, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2a, 0x22, 0x0a, 0x0a, - 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x5f, 0x65, 0x12, 0x14, 0x0a, 0x0c, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0xd1, 0xa2, 0xd5, 0xc4, 0x07, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x63, 0x73, + 0x64, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x64, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, + 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, + 0x2a, 0x0a, 0x0f, 0x53, 0x4d, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x58, 0x0a, 0x0f, 0x43, + 0x4d, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, + 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x72, 0x6f, + 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x0f, 0x53, 0x4d, 0x50, 0x72, 0x6f, 0x6d, 0x6f, + 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, + 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, + 0x67, 0x22, 0x55, 0x0a, 0x0e, 0x43, 0x4d, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x28, + 0x0a, 0x0f, 0x64, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0e, 0x53, 0x4d, 0x44, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, + 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, + 0x4d, 0x73, 0x67, 0x22, 0x26, 0x0a, 0x09, 0x43, 0x4d, 0x44, 0x69, 0x73, 0x62, 0x61, 0x6e, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x24, 0x0a, 0x09, 0x53, + 0x4d, 0x44, 0x69, 0x73, 0x62, 0x61, 0x6e, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, + 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, + 0x67, 0x22, 0x2a, 0x0a, 0x0e, 0x43, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x47, 0x75, 0x69, + 0x6c, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x35, 0x0a, + 0x0e, 0x53, 0x4d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x12, + 0x23, 0x0a, 0x06, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x63, 0x73, 0x2e, 0x4d, 0x46, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x06, 0x67, 0x75, + 0x69, 0x6c, 0x64, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x07, 0x4d, 0x46, 0x47, 0x75, 0x69, 0x6c, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1b, 0x0a, 0x09, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2a, 0x22, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x74, 0x5f, 0x65, 0x12, 0x14, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0xd1, 0xa2, 0xd5, 0xc4, 0x07, 0x42, 0x06, 0x5a, 0x04, 0x2e, + 0x3b, 0x63, 0x73, } var ( @@ -3071,7 +3008,7 @@ func file_cs_proto_proto_rawDescGZIP() []byte { } var file_cs_proto_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cs_proto_proto_msgTypes = make([]protoimpl.MessageInfo, 52) +var file_cs_proto_proto_msgTypes = make([]protoimpl.MessageInfo, 51) var file_cs_proto_proto_goTypes = []interface{}{ (ConstantE)(0), // 0: cs.Constant_e (*CMPing)(nil), // 1: cs.CMPing @@ -3102,43 +3039,41 @@ var file_cs_proto_proto_goTypes = []interface{}{ (*CMDeleteFriendShip)(nil), // 26: cs.CMDeleteFriendShip (*SMDeleteFriendShip)(nil), // 27: cs.SMDeleteFriendShip (*MFUser)(nil), // 28: cs.MFUser - (*MFPendingFriendRequest)(nil), // 29: cs.MFPendingFriendRequest - (*CMGuildInfo)(nil), // 30: cs.CMGuildInfo - (*SMGuildInfo)(nil), // 31: cs.SMGuildInfo - (*CMCreateGuild)(nil), // 32: cs.CMCreateGuild - (*SMCreateGuild)(nil), // 33: cs.SMCreateGuild - (*CMApplyToGuild)(nil), // 34: cs.CMApplyToGuild - (*SMApplyToGuild)(nil), // 35: cs.SMApplyToGuild - (*CMApprove)(nil), // 36: cs.CMApprove - (*SMApprove)(nil), // 37: cs.SMApprove - (*CMReject)(nil), // 38: cs.CMReject - (*SMReject)(nil), // 39: cs.SMReject - (*CMLeaveGuild)(nil), // 40: cs.CMLeaveGuild - (*SMLeaveGuild)(nil), // 41: cs.SMLeaveGuild - (*CMDismissMember)(nil), // 42: cs.CMDismissMember - (*SMDismissMember)(nil), // 43: cs.SMDismissMember - (*CMPromoteMember)(nil), // 44: cs.CMPromoteMember - (*SMPromoteMember)(nil), // 45: cs.SMPromoteMember - (*CMDemoteMember)(nil), // 46: cs.CMDemoteMember - (*SMDemoteMember)(nil), // 47: cs.SMDemoteMember - (*CMDisband)(nil), // 48: cs.CMDisband - (*SMDisband)(nil), // 49: cs.SMDisband - (*CMSearchGuilds)(nil), // 50: cs.CMSearchGuilds - (*SMSearchGuilds)(nil), // 51: cs.SMSearchGuilds - (*MFGuild)(nil), // 52: cs.MFGuild + (*CMGuildInfo)(nil), // 29: cs.CMGuildInfo + (*SMGuildInfo)(nil), // 30: cs.SMGuildInfo + (*CMCreateGuild)(nil), // 31: cs.CMCreateGuild + (*SMCreateGuild)(nil), // 32: cs.SMCreateGuild + (*CMApplyToGuild)(nil), // 33: cs.CMApplyToGuild + (*SMApplyToGuild)(nil), // 34: cs.SMApplyToGuild + (*CMApprove)(nil), // 35: cs.CMApprove + (*SMApprove)(nil), // 36: cs.SMApprove + (*CMReject)(nil), // 37: cs.CMReject + (*SMReject)(nil), // 38: cs.SMReject + (*CMLeaveGuild)(nil), // 39: cs.CMLeaveGuild + (*SMLeaveGuild)(nil), // 40: cs.SMLeaveGuild + (*CMDismissMember)(nil), // 41: cs.CMDismissMember + (*SMDismissMember)(nil), // 42: cs.SMDismissMember + (*CMPromoteMember)(nil), // 43: cs.CMPromoteMember + (*SMPromoteMember)(nil), // 44: cs.SMPromoteMember + (*CMDemoteMember)(nil), // 45: cs.CMDemoteMember + (*SMDemoteMember)(nil), // 46: cs.SMDemoteMember + (*CMDisband)(nil), // 47: cs.CMDisband + (*SMDisband)(nil), // 48: cs.SMDisband + (*CMSearchGuilds)(nil), // 49: cs.CMSearchGuilds + (*SMSearchGuilds)(nil), // 50: cs.SMSearchGuilds + (*MFGuild)(nil), // 51: cs.MFGuild } var file_cs_proto_proto_depIdxs = []int32{ 28, // 0: cs.SMSearchUser.users:type_name -> cs.MFUser - 29, // 1: cs.SMListPendingFriendRequest.pendingFriendRequest:type_name -> cs.MFPendingFriendRequest - 28, // 2: cs.SMListFriend.users:type_name -> cs.MFUser - 52, // 3: cs.SMGuildInfo.curr_guild:type_name -> cs.MFGuild - 52, // 4: cs.SMGuildInfo.random_guilds:type_name -> cs.MFGuild - 52, // 5: cs.SMSearchGuilds.guilds:type_name -> cs.MFGuild - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 28, // 1: cs.SMListFriend.users:type_name -> cs.MFUser + 51, // 2: cs.SMGuildInfo.curr_guild:type_name -> cs.MFGuild + 51, // 3: cs.SMGuildInfo.random_guilds:type_name -> cs.MFGuild + 51, // 4: cs.SMSearchGuilds.guilds:type_name -> cs.MFGuild + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_cs_proto_proto_init() } @@ -3484,18 +3419,6 @@ func file_cs_proto_proto_init() { } } file_cs_proto_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MFPendingFriendRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cs_proto_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CMGuildInfo); i { case 0: return &v.state @@ -3507,7 +3430,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SMGuildInfo); i { case 0: return &v.state @@ -3519,7 +3442,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CMCreateGuild); i { case 0: return &v.state @@ -3531,7 +3454,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SMCreateGuild); i { case 0: return &v.state @@ -3543,7 +3466,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CMApplyToGuild); i { case 0: return &v.state @@ -3555,7 +3478,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SMApplyToGuild); i { case 0: return &v.state @@ -3567,7 +3490,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CMApprove); i { case 0: return &v.state @@ -3579,7 +3502,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SMApprove); i { case 0: return &v.state @@ -3591,7 +3514,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CMReject); i { case 0: return &v.state @@ -3603,7 +3526,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SMReject); i { case 0: return &v.state @@ -3615,7 +3538,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CMLeaveGuild); i { case 0: return &v.state @@ -3627,7 +3550,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SMLeaveGuild); i { case 0: return &v.state @@ -3639,7 +3562,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CMDismissMember); i { case 0: return &v.state @@ -3651,7 +3574,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SMDismissMember); i { case 0: return &v.state @@ -3663,7 +3586,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CMPromoteMember); i { case 0: return &v.state @@ -3675,7 +3598,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SMPromoteMember); i { case 0: return &v.state @@ -3687,7 +3610,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CMDemoteMember); i { case 0: return &v.state @@ -3699,7 +3622,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SMDemoteMember); i { case 0: return &v.state @@ -3711,7 +3634,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CMDisband); i { case 0: return &v.state @@ -3723,7 +3646,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SMDisband); i { case 0: return &v.state @@ -3735,7 +3658,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CMSearchGuilds); i { case 0: return &v.state @@ -3747,7 +3670,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SMSearchGuilds); i { case 0: return &v.state @@ -3759,7 +3682,7 @@ func file_cs_proto_proto_init() { return nil } } - file_cs_proto_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + file_cs_proto_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MFGuild); i { case 0: return &v.state @@ -3778,7 +3701,7 @@ func file_cs_proto_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cs_proto_proto_rawDesc, NumEnums: 1, - NumMessages: 52, + NumMessages: 51, NumExtensions: 0, NumServices: 0, }, diff --git a/server/imserver/friendsdbmgr.go b/server/imserver/friendsdbmgr.go index 3a26ace8..181b4e9a 100644 --- a/server/imserver/friendsdbmgr.go +++ b/server/imserver/friendsdbmgr.go @@ -6,22 +6,29 @@ import ( "q5" ) -func (fm *FriendsMgr) insertFriendRequest(account1Id string, account2Id string) { +func (fm *FriendsMgr) insertFriendRequest(account1Id string, account2Id string, is_friendship string) { fields := [][]string{ {"sender_account_id", account1Id}, {"receiver_account_id", account2Id}, + {"is_friendship", is_friendship}, } - f5.GetJsStyleDb().Insert( + f5.GetJsStyleDb().Replace( FRIEND_DB, - "t_friend_pending_requests", + "t_friend_pending_request", fields, - func(error, int64, int64) {}, + func(err error, lastInsertId int64, rowsAffected int64) { + if err != nil { + fmt.Printf("error:%v\n", err) + } + fmt.Printf("lastInsertId:%d\n", lastInsertId) + fmt.Printf("rowsAffected:%d\n", rowsAffected) + }, ) } -func (fm *FriendsMgr) updateFriendRequest(account1Id string, account2Id string, flag int) { - fields := [][]string{ - {"flag", q5.ToString(flag)}, +func (fm *FriendsMgr) updateFriendRequest(account1Id string, account2Id string, fields [][]string) { + if len(fields) <= 0 { + return } where := [][]string{ {"sender_account_id", account1Id}, @@ -29,29 +36,40 @@ func (fm *FriendsMgr) updateFriendRequest(account1Id string, account2Id string, } f5.GetJsStyleDb().Update( FRIEND_DB, - "t_friend_pending_requests", + "t_friend_pending_request", fields, where, - func(error, int64, int64) {}, + func(err error, lastInsertId int64, rowsAffected int64) { + if err != nil { + fmt.Printf("error:%v\n", err) + } + fmt.Printf("lastInsertId:%d\n", lastInsertId) + fmt.Printf("rowsAffected:%d\n", rowsAffected) + }, ) } func (fm *FriendsMgr) insertFriendShip(account1Id string, account2Id string) { fields := [][]string{ - {"user1_id", account1Id}, - {"user2_id", account2Id}, + {"account1_id", account1Id}, + {"account2_id", account2Id}, } f5.GetJsStyleDb().Insert( FRIEND_DB, "t_friend_ships", fields, - func(error, int64, int64) {}, + func(err error, lastInsertId int64, rowsAffected int64) { + if err != nil { + fmt.Printf("error:%v\n", err) + } + fmt.Printf("lastInsertId:%d\n", lastInsertId) + fmt.Printf("rowsAffected:%d\n", rowsAffected) + }, ) } +// loadUsers 加载所有用户 func (fm *FriendsMgr) loadUsers() { - fmt.Printf("loadUsers from db\n") - // Load DB users to struct FriendsMgr.user fields := []string{"account_id", "name"} f5.GetJsStyleDb().Select( GAME_DB, @@ -64,11 +82,11 @@ func (fm *FriendsMgr) loadUsers() { func (fm *FriendsMgr) loadUsersResult(err error, rows *f5.DataSet) { if err != nil { - fmt.Printf("loadUsersFromDBResult err:%v \n", err) + fmt.Printf("loadUsersResult err:%v \n", err) return } - fm.users = make(map[string]*User) + fm.users = make(map[string]*User, 100) for rows.Next() { user := &User{ AccountId: q5.ToString(*rows.GetByIndex(0)), @@ -76,11 +94,11 @@ func (fm *FriendsMgr) loadUsersResult(err error, rows *f5.DataSet) { } fm.users[user.AccountId] = user } + fm.userCount = len(fm.users) } +// loadFriendships 加载好友关系表 func (fm *FriendsMgr) loadFriendships() { - fmt.Printf("loadFriendships from db\n") - fields := []string{"account1_id", "account2_id"} f5.GetJsStyleDb().Select( FRIEND_DB, @@ -93,7 +111,7 @@ func (fm *FriendsMgr) loadFriendships() { func (fm *FriendsMgr) loadFriendshipsResult(err error, rows *f5.DataSet) { if err != nil { - fmt.Printf("loadFriendshipsFromDBResult err:%v \n", err) + fmt.Printf("loadFriendshipsResult err:%v \n", err) return } fm.friendships = make(map[string][]*Friendship) @@ -103,7 +121,6 @@ func (fm *FriendsMgr) loadFriendshipsResult(err error, rows *f5.DataSet) { if user1 == nil || user2 == nil { continue } - friendship := &Friendship{} friendship.User1 = user1 friendship.User2 = user2 @@ -112,16 +129,15 @@ func (fm *FriendsMgr) loadFriendshipsResult(err error, rows *f5.DataSet) { } } +// loadPendingRequests 加载等待验证好友请求 func (fm *FriendsMgr) loadPendingRequests() { - fmt.Printf("loadPendingRequests from db\n") - fields := []string{"sender_account_id", "receiver_account_id"} f5.GetJsStyleDb().Select( FRIEND_DB, - "t_friend_pending_requests", + "t_friend_pending_request", fields, [][]string{ - {"flag", "0"}, + {"is_friendship", "0"}, }, fm.loadPendingRequestsResult, ) @@ -129,13 +145,14 @@ func (fm *FriendsMgr) loadPendingRequests() { func (fm *FriendsMgr) loadPendingRequestsResult(err error, rows *f5.DataSet) { if err != nil { - fmt.Printf("loadFriendshipsFromDBResult err:%v \n", err) + fmt.Printf("loadPendingRequestsResult err:%v \n", err) return } - fm.pendingReqs = make(map[string]map[string]bool, MaxPendingFriendReqs) + fm.pendingReqs = make(map[string]map[string]bool) for rows.Next() { senderAccountId := q5.ToString(*rows.GetByIndex(0)) receiverAccountId := q5.ToString(*rows.GetByIndex(1)) + fm.pendingReqs[receiverAccountId] = make(map[string]bool) fm.pendingReqs[receiverAccountId][senderAccountId] = true } } diff --git a/server/imserver/friendsmgr.go b/server/imserver/friendsmgr.go index e08dc6ea..712e3d7a 100644 --- a/server/imserver/friendsmgr.go +++ b/server/imserver/friendsmgr.go @@ -16,7 +16,8 @@ type FriendsMgr struct { searchCaches map[string]SearchCache // SearchKeyword -> 好友搜索结果 []*User friendships map[string][]*Friendship // AccountId -> 好友关系列表 []*Friendship pendingReqs map[string]map[string]bool // AccountId -> 等待请求列表 map[account2Id]true - blockedUser map[string][]string // AccountId -> 黑名单列表 []AccountIds + blackList map[string][]string // AccountId -> 黑名单列表 []AccountIds + userCount int // 用户总数 } type SearchCache struct { @@ -24,17 +25,8 @@ type SearchCache struct { LastModified time.Time } -//func NewFriendsMgr() *FriendsMgr { -// return &FriendsMgr{ -// users: make(map[string]*User), -// searchCaches: make(map[string]SearchCache), -// friendships: make(map[string][]*Friendship), -// pendingReqs: make(map[string]map[string]bool), -// blockedUser: make(map[string][]string), -// } -//} - func (fm *FriendsMgr) init() { + fm.userCount = 0 // 加载所有用户 fm.loadUsers() // 加载好友关系表 列表 @@ -49,6 +41,7 @@ func (fm *FriendsMgr) unInit() { // 2. Struct Data Persist to DB } +// 搜索指定用户 func (fm *FriendsMgr) searchByAccountId(accountId string) *User { if user, ok := fm.users[accountId]; ok { return user @@ -56,6 +49,7 @@ func (fm *FriendsMgr) searchByAccountId(accountId string) *User { return nil } +// 搜索用户 func (fm *FriendsMgr) searchUsers(keyword string) []*User { if len(keyword) > SearchWord { return nil @@ -97,40 +91,6 @@ func (fm *FriendsMgr) searchUsers(keyword string) []*User { return listFriend } -func (fm *FriendsMgr) addBlocked(account1Id string, account2Id string) error { - if fm.blockedUser[account1Id] == nil { - fm.blockedUser[account1Id] = []string{} - } - if len(fm.blockedUser[account1Id]) >= 50 { - return fmt.Errorf("your blacklist has reached the limit") - } - - index := fm.findBlockedUserIndex(account1Id, account2Id) - if index < 0 { - fm.blockedUser[account1Id] = append(fm.blockedUser[account1Id], account2Id) - } - - return nil -} - -func (fm *FriendsMgr) removeBlocked(account1Id string, account2Id string) error { - if fm.blockedUser[account1Id] == nil { - return fmt.Errorf("your blacklist is emtpy") - } - - index := fm.findBlockedUserIndex(account1Id, account2Id) - if index < 0 { - return fmt.Errorf("your blacklist not exists target account id") - } - - blockedUsers := fm.blockedUser[account1Id] - blockedUsers = append(blockedUsers[:index], blockedUsers[index+1:]...) - - fm.blockedUser[account1Id] = blockedUsers - - return nil -} - // addFriendRequest 添加好友请求 func (fm *FriendsMgr) addFriendRequest(account1Id string, account2Id string) error { _, exists1 := fm.users[account1Id] @@ -139,17 +99,11 @@ func (fm *FriendsMgr) addFriendRequest(account1Id string, account2Id string) err return errors.New("users not exist") } - // step1. check in blocked - for _, blockedAccountId := range fm.blockedUser[account1Id] { - if blockedAccountId == account2Id { - return errors.New("users in blocked") - } - } - for _, blockedAccountId := range fm.blockedUser[account2Id] { - if blockedAccountId == account2Id { - return errors.New("users in blocked") - } + err := fm.checkInBlackList(account1Id, account2Id) + if err != nil { + return err } + // 已发送请求 if _, ok := fm.pendingReqs[account1Id][account2Id]; ok { return nil @@ -167,22 +121,28 @@ func (fm *FriendsMgr) addFriendRequest(account1Id string, account2Id string) err return fmt.Errorf("player:%s, friends are full", account2Id) } - // 为 account2Id 创建等待验证好友请求 记录,由 account1Id 申请的 - if fm.pendingReqs[account2Id] == nil { - fm.pendingReqs[account2Id] = make(map[string]bool, 20) + if fm.pendingReqs == nil { + fm.pendingReqs = make(map[string]map[string]bool, 200) + } + if fm.pendingReqs[account1Id] == nil { + fm.pendingReqs[account1Id] = make(map[string]bool, MaxPendingFriendReqs) } fm.pendingReqs[account1Id][account2Id] = true + + if fm.pendingReqs[account2Id] == nil { + fm.pendingReqs[account2Id] = make(map[string]bool, MaxPendingFriendReqs) + } fm.pendingReqs[account2Id][account1Id] = true // persist to db - fm.insertFriendRequest(account1Id, account2Id) + fm.insertFriendRequest(account1Id, account2Id, "0") return nil } // acceptFriendRequest 接受好友请求 func (fm *FriendsMgr) acceptFriendRequest(account1Id string, account2Id string) error { - if _, ok := fm.pendingReqs[account1Id][account2Id]; ok { + if _, ok := fm.pendingReqs[account1Id][account2Id]; !ok { return errors.New("no pending friend request from account1Id to account2Id") } @@ -193,10 +153,9 @@ func (fm *FriendsMgr) acceptFriendRequest(account1Id string, account2Id string) return fmt.Errorf("player:%s, friends are full", account2Id) } - // step1. update friend reqs - flag := 1 - fm.updateFriendRequest(account1Id, account2Id, flag) - // step2. add t_friend_ships + // step1. update reqs + fm.insertFriendRequest(account2Id, account1Id, "1") + // step2. insert friendship compareResult := strings.Compare(account1Id, account2Id) if compareResult > 0 { temp := account1Id @@ -220,15 +179,18 @@ func (fm *FriendsMgr) acceptFriendRequest(account1Id string, account2Id string) // rejectFriendRequest 拒绝好友请求 func (fm *FriendsMgr) rejectFriendRequest(account1Id string, account2Id string) error { + if fm.pendingReqs[account1Id] == nil { return errors.New("no pending friend request to reject") } - if _, ok := fm.pendingReqs[account1Id][account2Id]; ok { + if _, ok := fm.pendingReqs[account1Id][account2Id]; !ok { return errors.New("no pending friend request from user1 to user2") } - flag := 2 - fm.updateFriendRequest(account1Id, account2Id, flag) + //fields := [][]string{{"is_friendship", q5.ToString(2)}} + //fm.updateFriendRequest(account1Id, account2Id, fields) + // 申请表,申请者,目标者, + fm.insertFriendRequest(account2Id, account1Id, "2") delete(fm.pendingReqs[account1Id], account2Id) delete(fm.pendingReqs[account2Id], account1Id) @@ -305,6 +267,40 @@ func (fm *FriendsMgr) listFriend(accountId string) []*User { return users } +func (fm *FriendsMgr) addBlocked(account1Id string, account2Id string) error { + if fm.blackList[account1Id] == nil { + fm.blackList[account1Id] = []string{} + } + if len(fm.blackList[account1Id]) >= 50 { + return fmt.Errorf("your blacklist has reached the limit") + } + + index := fm.findBlockedUserIndex(account1Id, account2Id) + if index < 0 { + fm.blackList[account1Id] = append(fm.blackList[account1Id], account2Id) + } + + return nil +} + +func (fm *FriendsMgr) removeBlocked(account1Id string, account2Id string) error { + if fm.blackList[account1Id] == nil { + return fmt.Errorf("your blacklist is emtpy") + } + + index := fm.findBlockedUserIndex(account1Id, account2Id) + if index < 0 { + return fmt.Errorf("your blacklist not exists target account id") + } + + blockedUsers := fm.blackList[account1Id] + blockedUsers = append(blockedUsers[:index], blockedUsers[index+1:]...) + + fm.blackList[account1Id] = blockedUsers + + return nil +} + func (fm *FriendsMgr) addFriendshipToMap(accountID string, friendship *Friendship) { if fm.friendships[accountID] == nil { fm.friendships[accountID] = []*Friendship{friendship} @@ -337,8 +333,8 @@ func PrintUsers(str string, userList []*User) { } func (fm *FriendsMgr) findBlockedUserIndex(Account1Id, Account2Id string) int { - if fm.blockedUser[Account1Id] != nil { - for i, blockedAccountId := range fm.blockedUser[Account1Id] { + if fm.blackList[Account1Id] != nil { + for i, blockedAccountId := range fm.blackList[Account1Id] { if blockedAccountId == Account2Id { return i } @@ -367,3 +363,17 @@ func (fm *FriendsMgr) getUser(accountId string) *User { } return nil } + +func (fm *FriendsMgr) checkInBlackList(account1Id, account2Id string) error { + for _, blockedAccountId := range fm.blackList[account1Id] { + if blockedAccountId == account2Id { + return fmt.Errorf("user:%s in user:%s blocked", account2Id, account1Id) + } + } + for _, blockedAccountId := range fm.blackList[account2Id] { + if blockedAccountId == account1Id { + return fmt.Errorf("user:%s in user:%s blocked", account1Id, account2Id) + } + } + return nil +} diff --git a/server/imserver/player.go b/server/imserver/player.go index 8aae62ea..c1593f8d 100644 --- a/server/imserver/player.go +++ b/server/imserver/player.go @@ -34,11 +34,11 @@ func (p *Player) CMSearchUser(hdr *f5.MsgHdr, msg *cs.CMSearchUser) { // CMSearchUserByAccountId 搜索指定用户 func (p *Player) CMSearchUserByAccountId(hdr *f5.MsgHdr, msg *cs.CMSearchUserByAccountId) { rspMsg := new(cs.SMSearchUserByAccountId) - user := friendMgr.searchByAccountId(msg.GetSearchKeyword()) + user := friendMgr.searchByAccountId(msg.GetAccountId()) if user != nil { rspMsg.AccountId = &user.AccountId rspMsg.Username = &user.Username - f5.GetSysLog().Info("CMSearchUserByAccountId search result: %s\n", *rspMsg.AccountId) + f5.GetSysLog().Info("CMSearchUserByAccountId AccountId: %s\n", *rspMsg.AccountId) } wspListener.sendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg) } @@ -91,13 +91,12 @@ func (p *Player) CMRejectFriendRequest(hdr *f5.MsgHdr, msg *cs.CMRejectFriendReq user1Id := p.accountId user2Id := msg.GetTargetAccountId() - err := friendMgr.acceptFriendRequest(user1Id, user2Id) + err := friendMgr.rejectFriendRequest(user1Id, user2Id) if err != nil { reason := err.Error() rspMsg.Reason = &reason wspListener.sendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg) - - f5.GetSysLog().Info("CMAcceptFriendRequest err:%s, params: %s or %s\n", reason, user1Id, user2Id) + f5.GetSysLog().Info("CMRejectFriendRequest err:%s, params: %s or %s\n", reason, user1Id, user2Id) return } @@ -110,14 +109,14 @@ func (p *Player) CMRejectFriendRequest(hdr *f5.MsgHdr, msg *cs.CMRejectFriendReq func (p *Player) CMListPendingFriendRequest(hdr *f5.MsgHdr, msg *cs.CMListPendingFriendRequest) { rspMsg := &cs.SMListPendingFriendRequest{} accountId := p.accountId - for accountId, flag := range friendMgr.pendingReqs[accountId] { - row := &cs.MFPendingFriendRequest{ - AccountId: &accountId, - Flag: &flag, - } - rspMsg.PendingFriendRequest = append(rspMsg.PendingFriendRequest, row) + + resAccountIds := make([]string, MaxPendingFriendReqs) + for accountId, _ := range friendMgr.pendingReqs[accountId] { + resAccountIds = append(resAccountIds, accountId) } - f5.GetSysLog().Info("CMListPendingFriendRequest requests count:%d\n", len(rspMsg.PendingFriendRequest)) + rspMsg.AccountIds = resAccountIds + + f5.GetSysLog().Info("CMListPendingFriendRequest requests count:%d\n", len(rspMsg.GetAccountIds())) wspListener.sendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg) } diff --git a/server/imserver/proto/cs_proto.proto b/server/imserver/proto/cs_proto.proto index 2cdfa7af..d58a90fd 100644 --- a/server/imserver/proto/cs_proto.proto +++ b/server/imserver/proto/cs_proto.proto @@ -133,7 +133,7 @@ message SMSearchUser // 请求搜索用户 CMSearchUserByAccountId message CMSearchUserByAccountId { - optional string search_keyword = 1; //搜索account id + optional string account_id = 1; //搜索account id } // 回复搜索用户 @@ -191,7 +191,7 @@ message CMListPendingFriendRequest // 回复等待验证的好友请求 message SMListPendingFriendRequest { - repeated MFPendingFriendRequest pendingFriendRequest = 1; + repeated string accountIds = 1; } // 请求我的好友列表 @@ -223,10 +223,6 @@ message MFUser { optional string account_id = 1; optional string username = 2; } -message MFPendingFriendRequest { - optional string account_id = 1; - optional bool flag = 2; -} // 请求公会信息 message CMGuildInfo