add all stats and tie stats to user rather than company
This commit is contained in:
12
config.go
12
config.go
@@ -44,18 +44,18 @@ type ClientConfig struct {
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Server *ServerConfig `json:"server"`
|
||||
Telegram *TelegramConfig `json:"telegram"`
|
||||
Game *GameConfig `json:"game"`
|
||||
Clients map[int]*ClientConfig `json:"clients"`
|
||||
Stats map[uint8]map[string]*Stat `json:"stats"`
|
||||
Server *ServerConfig `json:"server"`
|
||||
Telegram *TelegramConfig `json:"telegram"`
|
||||
Game *GameConfig `json:"game"`
|
||||
Clients map[int]*ClientConfig `json:"clients"`
|
||||
Stats map[int]map[string]*Stat `json:"stats"`
|
||||
}
|
||||
|
||||
// Init values for a config based on package defaults
|
||||
func (c *Config) Init() error {
|
||||
err := json.Unmarshal(cfgSample, &c)
|
||||
c.Clients = make(map[int]*ClientConfig)
|
||||
c.Stats = make(map[uint8]map[string]*Stat)
|
||||
c.Stats = make(map[int]map[string]*Stat)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user