From 6f2d293f12fbe616ea9e26d7e445d56f363f1448 Mon Sep 17 00:00:00 2001 From: HimbeerserverDE Date: Sat, 11 Sep 2021 11:49:38 +0200 Subject: [PATCH] All players have the empty string permission --- perms.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perms.go b/perms.go index 85091ae..b1ce260 100644 --- a/perms.go +++ b/perms.go @@ -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{}{} }