removed unwanted log write

doctor logging per-ip
This commit is contained in:
2026-04-20 13:45:03 +03:00
parent f32ca9f568
commit 98aa31b5f5
3 changed files with 18 additions and 38 deletions
+3 -5
View File
@@ -2,7 +2,6 @@ package utils
import (
"fmt"
"log"
"os"
"github.com/9seconds/mtg/v2/essentials"
@@ -62,20 +61,18 @@ func readCustomDC(cfg *config.Config) {
}
if len(cfg.DCs.DC10002) > 0 {
var ips []string
for _, addr := range cfg.DCs.DC203 {
for _, addr := range cfg.DCs.DC10002 {
ips = append(ips, addr.Value)
}
essentials.TelegramCoreAddresses[10002] = ips
}
if len(cfg.DCs.DC10003) > 0 {
var ips []string
for _, addr := range cfg.DCs.DC203 {
for _, addr := range cfg.DCs.DC10003 {
ips = append(ips, addr.Value)
}
essentials.TelegramCoreAddresses[10003] = ips
}
log.Println(essentials.TelegramCoreAddresses)
log.Println(cfg.DCs)
}
func ReadConfig(path string) (*config.Config, error) {
@@ -92,6 +89,7 @@ func ReadConfig(path string) (*config.Config, error) {
if err := conf.Validate(); err != nil {
return nil, fmt.Errorf("invalid config: %w", err)
}
readCustomDC(conf)
return conf, nil