aboutsummaryrefslogtreecommitdiff
path: root/cmd/mud
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/mud')
-rw-r--r--cmd/mud/main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/mud/main.go b/cmd/mud/main.go
index cc8c96b..6940cd6 100644
--- a/cmd/mud/main.go
+++ b/cmd/mud/main.go
@@ -26,7 +26,10 @@ func main() {
cfg, err := config.Load(*configPath)
if err != nil {
if os.IsNotExist(err) {
- log.Printf("config file %s not found, using defaults (telnet :4000)", *configPath)
+ log.Printf("config file %s not found, creating with defaults", *configPath)
+ if err := config.SaveDefault(*configPath); err != nil {
+ log.Fatalf("failed to create config: %v", err)
+ }
cfg = config.Default()
} else {
log.Fatalf("failed to load config: %v", err)