1
This commit is contained in:
parent
571ee553e9
commit
ed9be693fc
@ -178,6 +178,7 @@ func (this *room) CMLeaveRoom(hdr *f5.MsgHdr, msg *cs.CMLeaveRoom) {
|
|||||||
nextOwner := this.getNextOwner()
|
nextOwner := this.getNextOwner()
|
||||||
if nextOwner == nil {
|
if nextOwner == nil {
|
||||||
this.doDisband(1)
|
this.doDisband(1)
|
||||||
|
return
|
||||||
} else {
|
} else {
|
||||||
this.removeMember(this.owner.hum.GetAccountId())
|
this.removeMember(this.owner.hum.GetAccountId())
|
||||||
this.owner = nextOwner
|
this.owner = nextOwner
|
||||||
@ -238,6 +239,7 @@ func (this *room) CMKickoutMember(hdr *f5.MsgHdr, msg *cs.CMKickoutMember) {
|
|||||||
target := this.getMember(msg.GetTargetId())
|
target := this.getMember(msg.GetTargetId())
|
||||||
if m == this.owner && target != nil {
|
if m == this.owner && target != nil {
|
||||||
notifyMsg := &cs.SMRoomKickoutNotify{}
|
notifyMsg := &cs.SMRoomKickoutNotify{}
|
||||||
|
notifyMsg.AccountIds = append(notifyMsg.AccountIds, msg.GetTargetId())
|
||||||
this.broadcastMsg(notifyMsg)
|
this.broadcastMsg(notifyMsg)
|
||||||
this.removeMember(target.hum.GetAccountId())
|
this.removeMember(target.hum.GetAccountId())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user