diff --git a/terminator/terminator.go b/terminator/terminator.go index 707a567..f5a6c87 100644 --- a/terminator/terminator.go +++ b/terminator/terminator.go @@ -81,7 +81,7 @@ func (t *Terminator) filterUsers(sessions []*base.Session) (filtered []*base.Ses for _, session := range sessions { if t.config.IncludeUsers == nil && includeRegex == nil { // append all sessions except excluded users - if !base.InSlice(session.User, excludeUsers) || (excludeRegex != nil && !excludeRegex.MatchString(session.User)) { + if !base.InSlice(session.User, excludeUsers) && (excludeRegex != nil && !excludeRegex.MatchString(session.User)) { filtered = append(filtered, session) } } else {