diff --git a/plugins/custom/Custom.php b/plugins/custom/Custom.php index a6e2bec..8b7e9da 100755 --- a/plugins/custom/Custom.php +++ b/plugins/custom/Custom.php @@ -14,9 +14,9 @@ class Custom extends Plugin $this->updateConfigFile(); } - private function updateConfigFile() + public function updateConfigFile() { - $path = dirname(__DIR__) . "/networks/custom.json"; + $path = dirname(__DIR__, 2) . "/networks/custom.json"; $current_config = @file_get_contents($path); $new_config = json_encode($this->config); if($current_config !== $new_config) { diff --git a/plugins/custom/plugin.js b/plugins/custom/plugin.js index e69de29..8381818 100644 --- a/plugins/custom/plugin.js +++ b/plugins/custom/plugin.js @@ -0,0 +1,5 @@ +import {App} from "/assets/App.js"; + +(async function(){ + await App.RPC.__invoke("custom::updateConfigFile") +})(); \ No newline at end of file