diff options
Diffstat (limited to 'cmd/thoi')
| -rw-r--r-- | cmd/thoi/main.go | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/cmd/thoi/main.go b/cmd/thoi/main.go index cf31177..915d7ca 100644 --- a/cmd/thoi/main.go +++ b/cmd/thoi/main.go @@ -80,7 +80,22 @@ func main() { // Both admin transports share one UndoStack over the shared history file. var sharedUndo *admin.UndoStack if cfg.AdminHTTP.Enabled { - adminSrv, err := admin.NewServer(cfg, false, g.AccountStore, g.World, g.ItemStore, g.ObjectStore, g.MobStore, dataDir, adminReloadCourses, adminRewriteRoomIDs, adminEvictRoom, adminRebuildCraftIndex, *configPath, g.RunAdminOnOwner) + adminSrv, err := admin.NewServer(admin.ServerDeps{ + Config: cfg, + UseTLS: false, + Accounts: g.AccountStore, + World: g.World, + Items: g.ItemStore, + Objects: g.ObjectStore, + Mobs: g.MobStore, + DataDir: dataDir, + ReloadCourses: adminReloadCourses, + RewriteRoomIDs: adminRewriteRoomIDs, + EvictRoom: adminEvictRoom, + RebuildCraftIndex: adminRebuildCraftIndex, + ConfigPath: *configPath, + RunOnOwner: g.RunAdminOnOwner, + }) if err != nil { log.Fatalf("failed to start admin HTTP server: %v", err) } @@ -97,7 +112,22 @@ func main() { } if cfg.AdminHTTPS.Enabled { - adminSrv, err := admin.NewServer(cfg, true, g.AccountStore, g.World, g.ItemStore, g.ObjectStore, g.MobStore, dataDir, adminReloadCourses, adminRewriteRoomIDs, adminEvictRoom, adminRebuildCraftIndex, *configPath, g.RunAdminOnOwner) + adminSrv, err := admin.NewServer(admin.ServerDeps{ + Config: cfg, + UseTLS: true, + Accounts: g.AccountStore, + World: g.World, + Items: g.ItemStore, + Objects: g.ObjectStore, + Mobs: g.MobStore, + DataDir: dataDir, + ReloadCourses: adminReloadCourses, + RewriteRoomIDs: adminRewriteRoomIDs, + EvictRoom: adminEvictRoom, + RebuildCraftIndex: adminRebuildCraftIndex, + ConfigPath: *configPath, + RunOnOwner: g.RunAdminOnOwner, + }) if err != nil { log.Fatalf("failed to start admin HTTPS server: %v", err) } |
