This commit is contained in:
aozhiwei 2020-09-27 09:44:28 +08:00
parent 1a6c150d79
commit 9b0eb93c5e

View File

@ -205,7 +205,7 @@ void Guild::_CMGuildAgree(f8::MsgHdr& hdr, const cs::CMGuildAgree& msg)
( (
msg.apply().base_data().account_id(), msg.apply().base_data().account_id(),
guild_id_, guild_id_,
1 kGuildApplyAgree
); );
ClearApplyBySenderId(msg.apply().base_data().account_id()); ClearApplyBySenderId(msg.apply().base_data().account_id());
} }
@ -296,16 +296,20 @@ void Guild::_CMGuildDismiss(f8::MsgHdr& hdr, const cs::CMGuildDismiss& msg)
void Guild::_CMGuildRename(f8::MsgHdr& hdr, const cs::CMGuildRename& msg) void Guild::_CMGuildRename(f8::MsgHdr& hdr, const cs::CMGuildRename& msg)
{ {
ss::SS_IM_ForwardGuildCMMsg *forward_msg = (ss::SS_IM_ForwardGuildCMMsg*)hdr.user_data;
guild_name_ = msg.new_name(); guild_name_ = msg.new_name();
cs::SMGuildRename respmsg; cs::SMGuildRename respmsg;
#if 0 GuildMgr::Instance()->ForwardGuildSMMsg(hdr.socket_handle,
GuildMgr::Instance()->ForwardGuildSMMsg(socket_handle, context, respmsg); forward_msg->context(),
respmsg);
MarkDirty(); MarkDirty();
#endif
} }
void Guild::_CMGuildMemberList(f8::MsgHdr& hdr, const cs::CMGuildMemberList& msg) void Guild::_CMGuildMemberList(f8::MsgHdr& hdr, const cs::CMGuildMemberList& msg)
{ {
ss::SS_IM_ForwardGuildCMMsg *forward_msg = (ss::SS_IM_ForwardGuildCMMsg*)hdr.user_data;
cs::SMGuildMemberList respmsg; cs::SMGuildMemberList respmsg;
*respmsg.mutable_paging() = msg.paging(); *respmsg.mutable_paging() = msg.paging();
if (respmsg.paging().page_size() <= 0) { if (respmsg.paging().page_size() <= 0) {
@ -321,6 +325,9 @@ void Guild::_CMGuildMemberList(f8::MsgHdr& hdr, const cs::CMGuildMemberList& msg
auto p = respmsg.add_member_list(); auto p = respmsg.add_member_list();
TypeConvert::Convert(*sorted_members_[i], *p); TypeConvert::Convert(*sorted_members_[i], *p);
} }
GuildMgr::Instance()->ForwardGuildSMMsg(hdr.socket_handle,
forward_msg->context(),
respmsg);
} }
void Guild::_CMGuildApplyList(f8::MsgHdr& hdr, const cs::CMGuildApplyList& msg) void Guild::_CMGuildApplyList(f8::MsgHdr& hdr, const cs::CMGuildApplyList& msg)