diff options
author | Pratyush Desai | 2024-10-10 16:56:19 +0200 |
---|---|---|
committer | Pratyush Desai | 2024-10-10 16:56:19 +0200 |
commit | 91b0e21b7ac29d11d7c6774c92c99f4640a1a8d1 (patch) | |
tree | 2e6a75f85583b04a7a19c54fade8e5ddb7cc44e6 /wat/bot.go | |
parent | e300f7137055a260c522fe546a75e528533cf812 (diff) | |
parent | dfe7deff72ec77f798efe243c1c22bb63c523040 (diff) | |
download | watbot-91b0e21b7ac29d11d7c6774c92c99f4640a1a8d1.tar.gz watbot-91b0e21b7ac29d11d7c6774c92c99f4640a1a8d1.tar.bz2 watbot-91b0e21b7ac29d11d7c6774c92c99f4640a1a8d1.zip |
Merge pull request 'Configurable database path' (#26) from config into master
Reviewed-on: https://git.com.de/LibertaCasa/watbot/pulls/26
Diffstat (limited to 'wat/bot.go')
-rw-r--r-- | wat/bot.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -20,6 +20,7 @@ type WatBot struct { } type WatConfig struct { + DatabasePath string BotHosts []string BotGames BotGameConfig AdminHosts []string @@ -30,7 +31,7 @@ type WatConfig struct { func NewWatBot(config *irc.ClientConfig, watConfig *WatConfig, serverConn *tls.Conn) *WatBot { wat := WatBot{conn: serverConn, Nick: config.Nick, c: watConfig} - wat.Db = NewWatDb() + wat.Db = NewWatDb(watConfig.DatabasePath) wat.game = NewWatGame(&wat, wat.Db) wat.integration = NewWatIntegration(&wat, wat.Db, &WatIntegrationConfig{BotHosts: watConfig.BotHosts, BotGames: watConfig.BotGames}) config.Handler = irc.HandlerFunc(wat.HandleIrcMsg) |