mirror of
https://github.com/m1k1o/neko-rooms.git
synced 2026-11-02 22:51:34 -06:00
fix parse room env.
This commit is contained in:
@@ -122,13 +122,9 @@ func (settings *RoomSettings) fromEnvV2(envs []string) error {
|
||||
case "NEKO_PASSWORD_ADMIN":
|
||||
settings.AdminPass = val
|
||||
case "NEKO_CONTROL_PROTECTION":
|
||||
if ok, _ := strconv.ParseBool(val); ok {
|
||||
settings.ControlProtection = true
|
||||
}
|
||||
settings.ControlProtection, err = strconv.ParseBool(val)
|
||||
case "NEKO_IMPLICIT_CONTROL":
|
||||
if ok, _ := strconv.ParseBool(val); ok {
|
||||
settings.ImplicitControl = true
|
||||
}
|
||||
settings.ImplicitControl, err = strconv.ParseBool(val)
|
||||
case "NEKO_SCREEN":
|
||||
settings.Screen = val
|
||||
case "NEKO_MAX_FPS":
|
||||
|
||||
@@ -133,13 +133,9 @@ func (settings *RoomSettings) fromEnvV3(envs []string) error {
|
||||
case "NEKO_MEMBER_MULTIUSER_ADMIN_PASSWORD":
|
||||
settings.AdminPass = val
|
||||
case "NEKO_SESSION_CONTROL_PROTECTION":
|
||||
if ok, _ := strconv.ParseBool(val); ok {
|
||||
settings.ControlProtection = true
|
||||
}
|
||||
settings.ControlProtection, err = strconv.ParseBool(val)
|
||||
case "NEKO_SESSION_IMPLICIT_HOSTING":
|
||||
if ok, _ := strconv.ParseBool(val); !ok {
|
||||
settings.ImplicitControl = false
|
||||
}
|
||||
settings.ImplicitControl, err = strconv.ParseBool(val)
|
||||
case "NEKO_DESKTOP_SCREEN":
|
||||
settings.Screen = val
|
||||
//case "NEKO_MAX_FPS": // TODO: not supported yet
|
||||
|
||||
Reference in New Issue
Block a user