1
0
Fork 0
forked from External/ergo

oper: Support custom vhosts, and chghost

This commit is contained in:
Daniel Oaks 2016-10-23 11:28:31 +10:00
parent 8e2a8cb1b3
commit 29e811a531
5 changed files with 23 additions and 2 deletions

View file

@ -209,6 +209,7 @@ func (conf *Config) OperatorClasses() (*map[string]OperClass, error) {
type Oper struct {
Class *OperClass
WhoisLine string
Vhost string
Pass []byte
}
@ -224,6 +225,7 @@ func (conf *Config) Operators(oc *map[string]OperClass) (map[string]Oper, error)
}
oper.Pass = opConf.PasswordBytes()
oper.Vhost = opConf.Vhost
class, exists := (*oc)[opConf.Class]
if !exists {
return nil, fmt.Errorf("Could not load operator [%s] - they use operclass [%s] which does not exist", name, opConf.Class)