add password config option

This commit is contained in:
Brad Fitzpatrick 2011-04-03 19:38:22 -07:00
parent 133c9dea1d
commit 6c45e453c4
1 changed files with 4 additions and 0 deletions

View File

@ -320,6 +320,10 @@ func configFileMain() {
exitFailure("error parsing JSON object in config file %s: %v", osutil.UserServerConfigPath(), err) exitFailure("error parsing JSON object in config file %s: %v", osutil.UserServerConfigPath(), err)
} }
if password, ok := config["password"].(string); ok {
auth.AccessPassword = password
}
prefixes, ok := config["prefixes"].(map[string]interface{}) prefixes, ok := config["prefixes"].(map[string]interface{})
if !ok { if !ok {
exitFailure("No top-level \"prefixes\": {...} in %s", osutil.UserServerConfigPath) exitFailure("No top-level \"prefixes\": {...} in %s", osutil.UserServerConfigPath)