From e8f1eb27b6dcd772c352517622b1815b0fb13448 Mon Sep 17 00:00:00 2001 From: kirillius Date: Thu, 5 Jun 2025 14:29:35 +0300 Subject: [PATCH] hotfix netsync --- plugins/netsync/Netsync.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/netsync/Netsync.php b/plugins/netsync/Netsync.php index 0351a05..7708bc0 100644 --- a/plugins/netsync/Netsync.php +++ b/plugins/netsync/Netsync.php @@ -58,6 +58,11 @@ class Netsync extends Plugin if (count($diff) > 0) { $wrapper["networks"] = array_values($remote_enabled); $wrapper->save(); + } + + $last_hash = $this->config["last_hash"] ?? ""; + $current_hash = md5(json_encode($remote_config)); + if ($last_hash != $current_hash) { foreach ($this->context->getRPC()->getPlugins() as $plugin) { /** * @var IPluggable $plugin @@ -65,6 +70,8 @@ class Netsync extends Plugin $plugin->onSync($remote_config); } + $this->config["last_hash"] = $current_hash; + $this->saveConfig(); } return $diff;