diff --git a/.gitignore b/.gitignore index 3e2090e..5046c3f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea *.save *.swp +corpus/ diff --git a/modes.go b/modes.go index 77f2370..550035e 100644 --- a/modes.go +++ b/modes.go @@ -421,7 +421,9 @@ func (p *UserPerms) MarshalJSON() ([]byte, error) { func (p *UserPerms) Lookup(channel string) (perms Perms, ok bool) { var permsi interface{} permsi, ok = p.channels.Get(ToRFC1459(channel)) - perms = permsi.(Perms) + if ok { + perms = permsi.(Perms) + } return perms, ok }