1
This commit is contained in:
parent
011f544c8a
commit
9d80bbf3d4
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user