USERHOST needs to respect hidden operators as well

This commit is contained in:
Shivaram Lingamneni 2020-10-09 12:29:09 -04:00
parent f5374c014b
commit 4ee97ddb43
3 changed files with 20 additions and 10 deletions

View file

@ -728,11 +728,6 @@ type Oper struct {
Modes []modes.ModeChange
}
// returns whether this is a publicly visible operator, for WHO/WHOIS purposes
func (oper *Oper) Visible(hasPrivs bool) bool {
return oper != nil && (hasPrivs || !oper.Hidden)
}
// Operators returns a map of operator configs from the given OperClass and config.
func (conf *Config) Operators(oc map[string]*OperClass) (map[string]*Oper, error) {
operators := make(map[string]*Oper)