up
This commit is contained in:
parent
10f936838f
commit
e99a0a921d
Binary file not shown.
@ -137,7 +137,9 @@ func (c *TCPClient) ReadLine() {
|
||||
continue
|
||||
}
|
||||
|
||||
if strings.Contains(message, Cfg.Cluster.LoginPrompt+" \r\n") {
|
||||
Log.Debugf("Received Message: %s", message)
|
||||
|
||||
if strings.Contains(message, Cfg.Cluster.LoginPrompt+"\r\n") || strings.Contains(message, Cfg.Cluster.LoginPrompt+" \r\n") {
|
||||
Log.Debug("Found login prompt...sending callsign")
|
||||
c.Write([]byte(c.Login + "\r\n"))
|
||||
time.Sleep(time.Second * 2)
|
||||
@ -154,7 +156,7 @@ func (c *TCPClient) ReadLine() {
|
||||
// Send the spot message to TCP server
|
||||
if len(c.TCPServer.Clients) > 0 {
|
||||
if count == 0 {
|
||||
// wait 3 seconds before sending messages to allow the client to connect
|
||||
// wait 5 seconds before sending messages to allow the client to connect
|
||||
time.Sleep(time.Second * 5)
|
||||
count++
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ func (s *TCPServer) broadcastMessage(message string) {
|
||||
for client := range s.Clients {
|
||||
_, err := client.Write([]byte(message))
|
||||
if err != nil {
|
||||
fmt.Println("error while sending message to clients:", client.RemoteAddr())
|
||||
fmt.Println("Error while sending message to clients:", client.RemoteAddr())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ cluster:
|
||||
port: 7300
|
||||
login: xv9q
|
||||
skimmer: true
|
||||
ft8: true
|
||||
ft8: false
|
||||
ft4: false
|
||||
command: #SET/NOFILTER
|
||||
login_prompt: "Please enter your call:"
|
||||
|
107
country.xml
107
country.xml
@ -4883,6 +4883,33 @@
|
||||
</CountryPrefix>
|
||||
</CountryPrefixList>
|
||||
</Country>
|
||||
<Country>
|
||||
<ArrlPrefix>OK/D</ArrlPrefix>
|
||||
<Comment />
|
||||
<Continent>EU</Continent>
|
||||
<CountryName>Czechoslovakia</CountryName>
|
||||
<CqZone>15</CqZone>
|
||||
<CqZoneList>
|
||||
<int>15</int>
|
||||
</CqZoneList>
|
||||
<Dxcc>218</Dxcc>
|
||||
<ItuZone>28</ItuZone>
|
||||
<IaruRegion>1</IaruRegion>
|
||||
<ItuZoneList>
|
||||
<int>28</int>
|
||||
</ItuZoneList>
|
||||
<Latitude>50.1</Latitude>
|
||||
<Longitude>15.5</Longitude>
|
||||
<Active>false</Active>
|
||||
<CountryTag />
|
||||
<CountryPrefixList>
|
||||
<CountryPrefix>
|
||||
<PrefixList>^OK.*|^OL.*|^OM.*</PrefixList>
|
||||
<StartDate xsi:nil="true" />
|
||||
<EndDate>1992-12-31T23:59:59Z</EndDate>
|
||||
</CountryPrefix>
|
||||
</CountryPrefixList>
|
||||
</Country>
|
||||
<Country>
|
||||
<ArrlPrefix>CR8/D</ArrlPrefix>
|
||||
<Comment />
|
||||
@ -6483,7 +6510,7 @@
|
||||
<EndDate>1992-02-29T23:59:59Z</EndDate>
|
||||
</CountryPrefix>
|
||||
<CountryPrefix>
|
||||
<PrefixList>^F1.*|^F2.*|^F3.*|^F4.*|^F5.*|^F6.*|^F7.*|^F8.*|^HW.*|^HX.*|^HY.*|^TH.*|^TM.*|^TP.*|^TQ.*|^TV.*|^TW.*</PrefixList>
|
||||
<PrefixList>^F.*|^HW.*|^HX.*|^HY.*|^TH.*|^TM.*|^TP.*|^TQ.*|^TV.*|^TW.*</PrefixList>
|
||||
<StartDate>1992-02-29T23:59:59Z</StartDate>
|
||||
<EndDate xsi:nil="true" />
|
||||
</CountryPrefix>
|
||||
@ -8120,6 +8147,48 @@
|
||||
</CountryPrefix>
|
||||
</CountryPrefixList>
|
||||
</Country>
|
||||
<Country>
|
||||
<ArrlPrefix>I5</ArrlPrefix>
|
||||
<Comment />
|
||||
<Continent>AF</Continent>
|
||||
<CountryName>Italian Somali</CountryName>
|
||||
<CqZone>38</CqZone>
|
||||
<CqZoneList>
|
||||
<int>38</int>
|
||||
</CqZoneList>
|
||||
<Dxcc>115</Dxcc>
|
||||
<ItuZone>47</ItuZone>
|
||||
<IaruRegion>1</IaruRegion>
|
||||
<ItuZoneList>
|
||||
<int>47</int>
|
||||
</ItuZoneList>
|
||||
<Latitude>2.1</Latitude>
|
||||
<Longitude>45.4</Longitude>
|
||||
<Active>false</Active>
|
||||
<CountryTag />
|
||||
<CountryPrefixList>
|
||||
<CountryPrefix>
|
||||
<PrefixList>^MD4.*|^MS4.*</PrefixList>
|
||||
<StartDate>1947-03-01T00:00:00Z</StartDate>
|
||||
<EndDate>1949-12-31T23:59:59Z</EndDate>
|
||||
</CountryPrefix>
|
||||
<CountryPrefix>
|
||||
<PrefixList>^MS4.*</PrefixList>
|
||||
<StartDate>1949-12-31T23:59:59Z</StartDate>
|
||||
<EndDate>1950-02-01T00:00:00Z</EndDate>
|
||||
</CountryPrefix>
|
||||
<CountryPrefix>
|
||||
<PrefixList>^I5.*|^MS4.*</PrefixList>
|
||||
<StartDate>1950-02-01T00:00:00Z</StartDate>
|
||||
<EndDate>1950-12-31T23:59:59Z</EndDate>
|
||||
</CountryPrefix>
|
||||
<CountryPrefix>
|
||||
<PrefixList>^I5.*</PrefixList>
|
||||
<StartDate>1950-12-31T23:59:59Z</StartDate>
|
||||
<EndDate>1960-06-30T23:59:59Z</EndDate>
|
||||
</CountryPrefix>
|
||||
</CountryPrefixList>
|
||||
</Country>
|
||||
<Country>
|
||||
<ArrlPrefix>I</ArrlPrefix>
|
||||
<Comment />
|
||||
@ -14860,6 +14929,38 @@
|
||||
</CountryPrefix>
|
||||
</CountryPrefixList>
|
||||
</Country>
|
||||
<Country>
|
||||
<ArrlPrefix>CN2</ArrlPrefix>
|
||||
<Comment />
|
||||
<Continent>AF</Continent>
|
||||
<CountryName>Tangier</CountryName>
|
||||
<CqZone>33</CqZone>
|
||||
<CqZoneList>
|
||||
<int>33</int>
|
||||
</CqZoneList>
|
||||
<Dxcc>264</Dxcc>
|
||||
<ItuZone>37</ItuZone>
|
||||
<IaruRegion>1</IaruRegion>
|
||||
<ItuZoneList>
|
||||
<int>37</int>
|
||||
</ItuZoneList>
|
||||
<Latitude>35.7</Latitude>
|
||||
<Longitude>-5.8</Longitude>
|
||||
<Active>false</Active>
|
||||
<CountryTag />
|
||||
<CountryPrefixList>
|
||||
<CountryPrefix>
|
||||
<PrefixList>^CN2.*|^EK1.*|^EK4.*</PrefixList>
|
||||
<StartDate xsi:nil="true" />
|
||||
<EndDate>1952-02-01T00:00:00Z</EndDate>
|
||||
</CountryPrefix>
|
||||
<CountryPrefix>
|
||||
<PrefixList>^CN2.*|^EK1.*|^EK4.*|^KT1.*|^WT1.*</PrefixList>
|
||||
<StartDate>1952-02-01T00:00:00Z</StartDate>
|
||||
<EndDate>1960-06-30T23:59:59Z</EndDate>
|
||||
</CountryPrefix>
|
||||
</CountryPrefixList>
|
||||
</Country>
|
||||
<Country>
|
||||
<ArrlPrefix>5H</ArrlPrefix>
|
||||
<Comment />
|
||||
@ -15814,7 +15915,7 @@
|
||||
<CountryTag />
|
||||
<CountryPrefixList>
|
||||
<CountryPrefix>
|
||||
<PrefixList>^4U/U.*</PrefixList>
|
||||
<PrefixList>^4U/U.*|4U1UN</PrefixList>
|
||||
<StartDate>1978-02-04T00:00:00Z</StartDate>
|
||||
<EndDate xsi:nil="true" />
|
||||
</CountryPrefix>
|
||||
@ -16020,7 +16121,7 @@
|
||||
<EndDate>2016-09-18T23:59:59Z</EndDate>
|
||||
</CountryPrefix>
|
||||
<CountryPrefix>
|
||||
<PrefixList>^AA.*|^AB.*|^AC.*|^AC5.*|^AD.*|^AE.*|^AF.*|^AG.*|^AI.*|^AJ.*|^AK.*|^K.*|^N.*|^W.*</PrefixList>
|
||||
<PrefixList>^AA.*|^AB.*|^AC.*|^AC5.*|^AD.*|^AE.*|^AF.*|^AG.*|^AI.*|^AJ.*|^AK.*|^K.*|^N.*|^W.*|^4U1WB</PrefixList>
|
||||
<StartDate>2016-09-18T23:59:59Z</StartDate>
|
||||
<EndDate xsi:nil="true" />
|
||||
</CountryPrefix>
|
||||
|
3
spot.go
3
spot.go
@ -42,7 +42,8 @@ func ProcessTelnetSpot(re *regexp.Regexp, spotRaw string, SpotChanToFlex chan Te
|
||||
spot.DXCC = GetDXCC(spot.DX, Countries)
|
||||
|
||||
if spot.DXCC == "" {
|
||||
Log.Infof("Could not identify the DXCC for %s", spot.DX)
|
||||
Log.Errorf("Could not identify the DXCC for %s", spot.DX)
|
||||
return
|
||||
}
|
||||
|
||||
spot.GetBand()
|
||||
|
24
xml.go
24
xml.go
@ -115,19 +115,25 @@ func GetDXCC(dxCall string, Countries Countries) string {
|
||||
}
|
||||
}
|
||||
|
||||
DXCCMatch := DXCCList[0]
|
||||
higherMatch := DXCCList[0].RegExCharacters
|
||||
if len(DXCCList) > 0 {
|
||||
DXCCMatch := DXCCList[0]
|
||||
higherMatch := 0
|
||||
|
||||
if len(DXCCList) > 1 {
|
||||
for i := 0; i < len(DXCCList); i++ {
|
||||
if DXCCList[i].RegExCharacters > higherMatch && !DXCCList[i].Ended {
|
||||
DXCCMatch = DXCCList[i]
|
||||
higherMatch = DXCCList[i].RegExCharacters
|
||||
if len(DXCCList) > 1 {
|
||||
for i := 0; i < len(DXCCList); i++ {
|
||||
if DXCCList[i].RegExCharacters > higherMatch && !DXCCList[i].Ended {
|
||||
DXCCMatch = DXCCList[i]
|
||||
higherMatch = DXCCList[i].RegExCharacters
|
||||
}
|
||||
}
|
||||
} else {
|
||||
DXCCMatch = DXCCList[0]
|
||||
}
|
||||
|
||||
return DXCCMatch.DXCC
|
||||
} else {
|
||||
DXCCMatch = DXCCList[0]
|
||||
Log.Errorf("Could not find %s in country list", dxCall)
|
||||
}
|
||||
|
||||
return DXCCMatch.DXCC
|
||||
return ""
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user