mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 16:14:02 +03:00
removed unwanted log write
doctor logging per-ip
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user