Settings styles; close #228

Former-commit-id: b564ba4e357b2d4b18c7f9407395894eb5e18159 [formerly 84ef220a2b10b8ed501c4499ef03d99acc148546] [formerly 00056633e5c2e947201a2dd1ad3bb937821edf61 [formerly e3212cd076]]
Former-commit-id: 866b84d788a5f8a9767affdef17806dbac984db6 [formerly a22d95ba5726dd5ea757410249bef37654213a68]
Former-commit-id: 4600591829c0a41c5de9defc3e30fbac28815e25
This commit is contained in:
Henrique Dias
2017-09-07 18:19:29 +01:00
parent ae19731015
commit 7de22b53b8
18 changed files with 133 additions and 38 deletions

View File

@@ -128,6 +128,11 @@ func (m *FileManager) Setup() error {
// Tries to get the event commands from the database.
// If they don't exist, initialize them.
err = m.Store.Config.Get("commands", &m.Commands)
if err == nil {
// ADD handlers to commands if dont exist
}
if err != nil && err == ErrNotExist {
m.Commands = map[string][]string{
"before_save": {},