Skip to content

Commit

Permalink
fix/typo(#113): kick non whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
zaigie committed Feb 5, 2024
1 parent eaf8df1 commit dff973b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ type Config struct {
DecodePath string `mapstructure:"decode_path"`
SyncInterval int `mapstructure:"sync_interval"`
} `mapstructure:"save"`
Manage struct {
KickNonWhitelist bool `mapstructure:"kick_non_whitelist"`
}
}

func Init(cfgFile string, conf *Config) {
Expand Down
5 changes: 3 additions & 2 deletions internal/task/task.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package task

import (
"github.com/zaigie/palworld-server-tool/internal/database"
"time"

"github.com/zaigie/palworld-server-tool/internal/database"

"github.com/go-co-op/gocron/v2"
"github.com/spf13/viper"
"github.com/zaigie/palworld-server-tool/internal/logger"
Expand All @@ -26,7 +27,7 @@ func RconSync(db *bbolt.DB) {
}
logger.Info("Rcon sync done\n")

kickInterval := viper.GetBool("rcon.kick")
kickInterval := viper.GetBool("manage.kick_non_whitelist")
if kickInterval {
go CheckAndKickPlayers(db, playersRcon)
}
Expand Down

0 comments on commit dff973b

Please sign in to comment.