diff options
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) |