This commit is contained in:
aozhiwei 2024-04-04 14:24:03 +08:00
parent 011f544c8a
commit 9d80bbf3d4

View File

@ -46,6 +46,20 @@ func (this *guild) addMember(m *member) {
this.idHash[m.memberId] = m
}
func (this *guild) getMember(accountId string) *member {
if m, ok := this.idHash[accountId]; ok {
return m
}
return nil
}
func (this *guild) isOwner(accountId string) bool {
if this.getMember(accountId) == nil {
return false
}
return this.ownerId == accountId
}
func newGuild() *guild {
p := new(guild)
p.idHash = make(map[string]*member)