Change where config is saved
This commit is contained in:
1
chess.go
1
chess.go
@ -14,7 +14,6 @@ import (
|
||||
|
||||
func chessCommand(m chat1.MsgSummary) {
|
||||
defer log.PanicSafe()
|
||||
defer saveConfig()
|
||||
convID := string(m.ConvID)
|
||||
parts := strings.Split(m.Content.Text.Body, " ")
|
||||
if g, ok := config.Games[convID]; ok {
|
||||
|
||||
3
main.go
3
main.go
@ -26,6 +26,7 @@ var (
|
||||
|
||||
func printChat(m chat1.MsgSummary) {
|
||||
defer log.PanicSafe()
|
||||
defer saveConfig()
|
||||
if m.Sender.Username == k.Username {
|
||||
return
|
||||
}
|
||||
@ -40,7 +41,7 @@ func main() {
|
||||
loadConfig()
|
||||
fmt.Println("Starting log")
|
||||
log = loggy.NewLogger(config.LogOpts)
|
||||
fmt.Println("Log configured?")
|
||||
fmt.Println("Log configured")
|
||||
defer log.PanicSafe()
|
||||
log.LogInfo("Logger configured")
|
||||
chat := printChat
|
||||
|
||||
Reference in New Issue
Block a user