From 08cc408dd3710ff794a6bb65e240dd0873ca9414 Mon Sep 17 00:00:00 2001 From: mercury Date: Fri, 7 Oct 2022 11:51:27 +0400 Subject: [PATCH] compatible filename peer conf --- app/bot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/bot.php b/app/bot.php index 0fc7049..185e260 100644 --- a/app/bot.php +++ b/app/bot.php @@ -205,7 +205,7 @@ class Bot $client = $this->readClients()[$client]; $name = $this->getName($client['interface']); $code = $this->createConfig($client); - $this->upload("$name.conf", $code); + $this->upload(preg_replace(['~\s+~', '~\(|\)~'], ['_', ''], $name) . ".conf", $code); } public function upload($name, $code)