GroupMemberCheck: Implement token matching.

This commit is contained in:
Mikkel Krautz 2011-04-30 23:21:37 +02:00
parent e177d4cf89
commit 1ee7aa6ac5

View file

@ -181,8 +181,12 @@ func GroupMemberCheck(current *Channel, aclchan *Channel, name string, client *C
if token { if token {
// The user is part of this group if the remaining name is part of // The user is part of this group if the remaining name is part of
// his access token list. // his access token list. The name check is case-insensitive.
log.Printf("GroupMemberCheck: Implement token matching") for _, clientToken := range client.Tokens {
if strings.ToLower(name) == strings.ToLower(clientToken) {
return true
}
}
return false return false
} else if hash { } else if hash {
// The user is part of this group if the remaining name matches his // The user is part of this group if the remaining name matches his