All players have the empty string permission

master
HimbeerserverDE 2021-09-11 11:49:38 +02:00
parent ce6a8413b1
commit 6f2d293f12
No known key found for this signature in database
GPG Key ID: 1A651504791E6A8B
1 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,10 @@ func (cc *ClientConn) Perms() []string {
// HasPerms returns true if the ClientConn has all
// of the specified permissions. Otherwise it returns false.
func (cc *ClientConn) HasPerms(want ...string) bool {
has := make(map[string]struct{})
has := map[string]struct{}{
"": struct{}{},
}
for _, perm := range cc.Perms() {
has[perm] = struct{}{}
}