diff --git a/server/hallserver/room/room.go b/server/hallserver/room/room.go index aafe8810..88d38822 100644 --- a/server/hallserver/room/room.go +++ b/server/hallserver/room/room.go @@ -263,7 +263,7 @@ func (this *room) CMKickoutTeam(hdr *f5.MsgHdr, msg *cs.CMKickoutTeam) { hum := hdr.Context.(common.Player) m := this.getMember(hum.GetAccountId()) t := this.getTeamByUuid(msg.GetTeamUuid()) - if m == this.owner && t != nil { + if m == this.owner && t != nil && t != m.team { notifyMsg := &cs.SMRoomKickoutNotify{} this.broadcastMsg(notifyMsg) t.unInit() @@ -279,7 +279,7 @@ func (this *room) CMKickoutMember(hdr *f5.MsgHdr, msg *cs.CMKickoutMember) { notifyMsg := &cs.SMRoomKickoutNotify{} notifyMsg.AccountIds = append(notifyMsg.AccountIds, msg.GetTargetId()) this.broadcastMsg(notifyMsg) - this.removeMember(target.hum.GetAccountId()) + target.unInit() this.notifyRoomInfo() } } @@ -419,7 +419,7 @@ func (this *room) canStart() bool { alreadyNum++ } } - return alreadyNum >- ROOM_MIN_START_TEAM_NUM + return alreadyNum >= ROOM_MIN_START_TEAM_NUM } func (this *room) isOwner(hum common.Player) bool {