0

Move settings routines to separate internal module

This commit is contained in:
eleksir
2025-10-12 11:58:03 +03:00
parent 24507ed6b4
commit 79840796f6
5 changed files with 41 additions and 26 deletions

12
util.go
View File

@@ -7,6 +7,8 @@ import (
"path/filepath"
"syscall"
"aleesa-irc-go/internal/setting"
"github.com/hjson/hjson-go"
log "github.com/sirupsen/logrus"
)
@@ -239,16 +241,12 @@ func sigHandler() {
log.Debug("Close irc connection")
ircClient.Quit()
log.Debug("Close userModeDB")
userMode.Close()
if len(settingsDB) > 0 {
log.Debug("Closing runtime irc channel settings db")
for _, db := range settingsDB {
_ = db.Close()
}
}
log.Debug("Close settingsDB")
setting.CloseAll()
os.Exit(0)
}