From 846100cf160efade9e0fa4a7455eef87bba587aa Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Thu, 3 Nov 2022 22:07:15 -0700 Subject: [PATCH] support reloading functions and programs --- src/ServerShell.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ServerShell.cc b/src/ServerShell.cc index 79a568f2..ee762dfa 100644 --- a/src/ServerShell.cc +++ b/src/ServerShell.cc @@ -61,7 +61,7 @@ Server commands:\n\ exit (or ctrl+d)\n\ Shut down the server.\n\ reload ...\n\ - Reload data. can be licenses or quests.\n\ + Reload data. can be licenses, quests, functions, or programs.\n\ Reloading will not affect items that are in use; for example, if a client\'s\n\ license is deleted by reloading, they will not be disconnected immediately.\n\ add-license \n\ @@ -167,6 +167,12 @@ Proxy commands (these will only work when exactly one client is connected):\n\ } else if (type == "quests") { shared_ptr qi(new QuestIndex("system/quests")); this->state->quest_index = qi; + } else if (type == "functions") { + shared_ptr fci(new FunctionCodeIndex("system/ppc")); + this->state->function_code_index = fci; + } else if (type == "programs") { + shared_ptr dfi(new DOLFileIndex("system/dol")); + this->state->dol_file_index = dfi; } else { throw invalid_argument("incorrect data type"); }