1
This commit is contained in:
parent
65a440d178
commit
fd036ffba0
@ -544,11 +544,13 @@ func (this *guildMgr) AsyncKickout(accountId string, targetId string, cb func(in
|
||||
model.GuildMember.DeleteSoft(guild.guildId, targetId,
|
||||
func (err error, lastInsertId int64, rowsAffected int64) {
|
||||
if err != nil {
|
||||
task.SetFail()
|
||||
cb(500, "server internal error")
|
||||
return
|
||||
}
|
||||
guild.delMember(targetId)
|
||||
this.delGuildMember(targetId)
|
||||
task.SetSucc()
|
||||
cb(0, "")
|
||||
})
|
||||
})
|
||||
@ -594,8 +596,8 @@ func (this *guildMgr) AsyncDisband(accountId string, cb func(int32, string, []st
|
||||
return
|
||||
}
|
||||
guild.disband()
|
||||
task.SetSucc()
|
||||
guild.disband()
|
||||
task.SetSucc()
|
||||
cb(0, "", members)
|
||||
})
|
||||
}
|
||||
|
@ -173,15 +173,17 @@ func (this *player) CMAcceptFriendRequest(hdr *f5.MsgHdr, msg *cs.CMAcceptFriend
|
||||
{constant.MEMBER_LOCK_KEY, this.GetAccountId()},
|
||||
{constant.MEMBER_LOCK_KEY, msg.GetTargetAccountId()},
|
||||
},
|
||||
func (cb *f5.LockAsyncTask) {
|
||||
func (task *f5.LockAsyncTask) {
|
||||
GetFriendMgr().AsyncAcceptApply(
|
||||
this.GetAccountId(),
|
||||
msg.GetTargetAccountId(),
|
||||
func (errCode int32, errMsg string) {
|
||||
if errCode != 0 {
|
||||
task.SetFail()
|
||||
this.SendMsg(rspMsg.Err(500, "server internal error"))
|
||||
return
|
||||
}
|
||||
task.SetSucc()
|
||||
this.SendMsg(rspMsg)
|
||||
})
|
||||
})
|
||||
@ -220,15 +222,17 @@ func (this *player) CMRejectFriendRequest(hdr *f5.MsgHdr, msg *cs.CMRejectFriend
|
||||
{constant.MEMBER_LOCK_KEY, this.GetAccountId()},
|
||||
{constant.MEMBER_LOCK_KEY, msg.GetTargetAccountId()},
|
||||
},
|
||||
func (cb *f5.LockAsyncTask) {
|
||||
func (task *f5.LockAsyncTask) {
|
||||
GetFriendMgr().AsyncRejectApply(
|
||||
this.GetAccountId(),
|
||||
msg.GetTargetAccountId(),
|
||||
func (errCode int32, errMsg string) {
|
||||
if errCode != 0 {
|
||||
task.SetFail()
|
||||
this.SendMsg(rspMsg.Err(500, "server internal error"))
|
||||
return
|
||||
}
|
||||
task.SetSucc()
|
||||
this.SendMsg(rspMsg)
|
||||
})
|
||||
})
|
||||
@ -299,15 +303,17 @@ func (this *player) CMRemoveBlacklist(hdr *f5.MsgHdr, msg *cs.CMRemoveBlacklist)
|
||||
{constant.MEMBER_LOCK_KEY, this.GetAccountId()},
|
||||
{constant.MEMBER_LOCK_KEY, msg.GetTargetAccountId()},
|
||||
},
|
||||
func (cb *f5.LockAsyncTask) {
|
||||
func (task *f5.LockAsyncTask) {
|
||||
GetFriendMgr().AsyncRemoveBlack(
|
||||
this.GetAccountId(),
|
||||
msg.GetTargetAccountId(),
|
||||
func (errCode int32, errMsg string) {
|
||||
if errCode != 0 {
|
||||
task.SetFail()
|
||||
this.SendMsg(rspMsg.Err(500, "server internal error"))
|
||||
return
|
||||
}
|
||||
task.SetSucc()
|
||||
this.SendMsg(rspMsg)
|
||||
})
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user