forked from External/ergo
many changes
- load config sub files relative to config file dir - load config file by name - expect bcrypt for passwords - -genpasswd for generating config-file-safe passwords - block client thread while checking passwords (PASS and OPER)
This commit is contained in:
parent
be089e7f5f
commit
72726a39b8
5 changed files with 77 additions and 107 deletions
|
|
@ -32,6 +32,14 @@ func (conf *Config) PasswordBytes() []byte {
|
|||
return decodePassword(conf.Password)
|
||||
}
|
||||
|
||||
func (conf *Config) OperatorsMap() map[string][]byte {
|
||||
operators := make(map[string][]byte)
|
||||
for _, opConf := range conf.Operators {
|
||||
operators[opConf.Name] = opConf.PasswordBytes()
|
||||
}
|
||||
return operators
|
||||
}
|
||||
|
||||
type OperatorConfig struct {
|
||||
Name string
|
||||
Password string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue