From b3394099a8d99a9513edb2484319ec47fd6a780f Mon Sep 17 00:00:00 2001 From: Eccentric Date: Sat, 3 Feb 2024 02:09:09 +0000 Subject: [PATCH] Add ability to customise god account names --- aid/config.go | 4 ++++ default.config.ini | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/aid/config.go b/aid/config.go index dcff8a3..ee2a360 100644 --- a/aid/config.go +++ b/aid/config.go @@ -8,6 +8,9 @@ import ( ) type CS struct { + Accounts struct { + Gods []string + } Database struct { URI string Type string @@ -51,6 +54,7 @@ func LoadConfig(file []byte) { panic(err) } + Config.Accounts.Gods = cfg.Section("accounts").Key("gods").Strings(",") Config.Database.DropAllTables = cfg.Section("database").Key("drop").MustBool(false) Config.Database.URI = cfg.Section("database").Key("uri").String() if Config.Database.URI == "" { diff --git a/default.config.ini b/default.config.ini index 4064826..5ba2547 100644 --- a/default.config.ini +++ b/default.config.ini @@ -1,9 +1,17 @@ +[accounts] +; comma separated list of usernames that are considered administrators or server accounts +; these accounts will be created upon the first run of snow +; they will have max permissions with snow +; to disable this, remove the line +gods=god,snow + [database] ; connect string uri="host=localhost user=postgres password=pass dbname=snow port=5432 sslmode=disable" ; currently only postgres is supported. memory and mongo will be added in the future type="postgres" -; drop all tables at start of program +; WARNING: ONLY USE IF NECESSARY +; deletes and resets the entire database on startup drop=false [discord]