script editor

This commit is contained in:
2023-10-06 13:15:19 +02:00
parent 13da56009e
commit e06cf1ae34
35 changed files with 776 additions and 68 deletions
+5 -1
View File
@@ -177,7 +177,11 @@ func New(addr string) (lucifer3.Service, error) {
}
}
if patch.Script != nil {
statePatch.Scripts[patch.Script.Name] = svc.data.Scripts[patch.Script.Name]
if len(patch.Script.Lines) > 0 {
statePatch.Scripts[patch.Script.Name] = svc.data.Scripts[patch.Script.Name]
} else {
statePatch.Scripts[patch.Script.Name] = nil
}
}
}
svc.mu.Unlock()