1
0
Fork 0
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:
Jeremy Latt 2014-02-24 09:41:09 -08:00
parent be089e7f5f
commit 72726a39b8
5 changed files with 77 additions and 107 deletions

View file

@ -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