From 170b5c7912771e4da269e659ddc9413bf93f5744 Mon Sep 17 00:00:00 2001 From: Greg Date: Wed, 30 Jul 2025 21:13:15 +0200 Subject: [PATCH] up --- TCPClient.go | 8 ++++---- config.yml | 8 ++++---- country.xml | 2 +- gotify.go | 7 +++++-- main.go | 2 +- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/TCPClient.go b/TCPClient.go index c980fd7..8a03b5f 100644 --- a/TCPClient.go +++ b/TCPClient.go @@ -150,10 +150,10 @@ func (c *TCPClient) ReadLine() { Log.Debug("Found login prompt...sending callsign") c.Write([]byte(c.Login + "\r\n")) c.LoggedIn = true - // c.SetFilters() - // if Cfg.Cluster.Command != "" { - // c.WriteString(Cfg.Cluster.Command + "\n\r") - // } + c.SetFilters() + if Cfg.Cluster.Command != "" { + c.WriteString(Cfg.Cluster.Command + "\n\r") + } Log.Infof("Connected to DX cluster %s:%s", Cfg.Cluster.Server, Cfg.Cluster.Port) Log.Info("Start receiving spots") continue diff --git a/config.yml b/config.yml index 2e33df6..7019407 100644 --- a/config.yml +++ b/config.yml @@ -16,24 +16,24 @@ database: sqlite: sqlite_path: 'C:\Perso\Seafile\Radio\Logs\Log4OM\F4BPO.SQLite' # SQLite Db oath of Log4OM cluster: - server: cluster.f4bpo.com # dxc.k0xm.net dxc.sm7iun.se + server: dxc.sm7iun.se # dxc.k0xm.net dxc.sm7iun.se port: 7300 login: f4bpo password: 89DGgg skimmer: true ft8: false ft4: false - command: + command: "SET/NOFILTER" #"SET/FILTER DOC/PASS EA,OH,G,F,DL,I,SV,9A,SK,S5,LX,OE,HA,CT" login_prompt: "login:" flex: discovery: true # Radio must be on same LAN than the program - ip: 10.10.10.120 # if discovery is true no need to put an IP + ip: 192.168.2.131 # if discovery is true no need to put an IP spot_life: 600 #seconds telnetserver: # Log4OM must be connected to this server ie: localhost:7301 if on same machine as this program else ip:7301 host: 0.0.0.0 port: 7301 gotify: - enable: false + enable: true url: https://gotify.rouggy.com/message token: ALaGS4MVMWTEMcP NewDXCC: true diff --git a/country.xml b/country.xml index 971bab6..799700f 100644 --- a/country.xml +++ b/country.xml @@ -8274,7 +8274,7 @@ - ^4U/I.* + ^4U0ITU|4U0ITU 1962-06-01T00:00:00Z diff --git a/gotify.go b/gotify.go index 24cda94..a9ca680 100644 --- a/gotify.go +++ b/gotify.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "net/http" + "strings" ) type GotifyMessage struct { @@ -15,9 +16,11 @@ type GotifyMessage struct { func Gotify(spot FlexSpot) { - if Cfg.Gotify.Enable { + ExceptionList := "4U1UN 5Z4B OH2B CS3B" - message := fmt.Sprintf("DX: %s\nFrom: %s\nFreq: %s\nMode: %s\n", spot.DX, spot.Source, spot.FrequencyMhz, spot.Mode) + if Cfg.Gotify.Enable && !strings.Contains(ExceptionList, spot.DX) { + + message := fmt.Sprintf("DX: %s\nFrom: %s\nFreq: %s\nMode: %s\nTime: %s\n", spot.DX, spot.SpotterCallsign, spot.FrequencyMhz, spot.Mode, spot.TimeStamp) gotifyMsg := GotifyMessage{ Title: "", diff --git a/main.go b/main.go index 5dc7d87..6a9d1eb 100644 --- a/main.go +++ b/main.go @@ -42,7 +42,7 @@ func main() { cfg := NewConfig(cfgPath) log := NewLog() - log.Info("Running FlexDXCluster version 0.6") + log.Info("Running FlexDXCluster version 0.7") log.Infof("Callsign: %s", cfg.General.Callsign) DeleteDatabase("./flex.sqlite", log)