1
This commit is contained in:
parent
d721f5d9f3
commit
32151093dc
@ -219,6 +219,10 @@ func (this *guild) delMember(memberId string) {
|
||||
delete(this.idHash, memberId)
|
||||
}
|
||||
|
||||
func (this *guild) isFull() bool {
|
||||
return this.GetMemberNum() >= this.maxMemberNum
|
||||
}
|
||||
|
||||
func newGuild() *guild {
|
||||
p := new(guild)
|
||||
p.idHash = make(map[string]*member)
|
||||
|
@ -352,6 +352,11 @@ func (this *guildMgr) asyncAcceptApplyTask(task *f5.LockAsyncTask, guild *guild,
|
||||
cb(1, "", "", "")
|
||||
return
|
||||
}
|
||||
if guild.isFull() {
|
||||
task.SetFail()
|
||||
cb(1, "Exceeding cube member number limit", "", "")
|
||||
return
|
||||
}
|
||||
if this.internalGetMemberByAccountId(targetId) != nil {
|
||||
task.SetFail()
|
||||
cb(1, "", "", "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user