Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

222 - don't display dx station's Entity string when same as users. #223

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion CWSST.pas
Expand Up @@ -297,7 +297,8 @@ function TCWSST.GetStationInfo(const ACallsign: string) : string;
// return userText. If empty, return DXCC Continent/Entity info.
userText := cwopsrec.UserText;
if userText.IsEmpty and
gDXCCList.FindRec(dxrec, ACallsign) then
gDXCCList.FindRec(dxrec, ACallsign) and
(dxrec.Entity <> Me.MyEntity) then
userText := dxRec.Continent + '/' + dxRec.Entity;

if not userText.IsEmpty then
Expand Down
12 changes: 11 additions & 1 deletion MyStn.pas
Expand Up @@ -17,6 +17,7 @@ TMyStation = class(TStation)
procedure AddToPieces(AMsg: string);
procedure SendNextPiece;
public
MyEntity : String;
constructor CreateStation;
destructor Destroy; override;
procedure Init;
Expand All @@ -32,7 +33,7 @@ TMyStation = class(TStation)
implementation

uses
SysUtils, RndFunc, Ini, MorseKey, Contest, Main;
SysUtils, RndFunc, Ini, MorseKey, Contest, Main, ARRL;

{ TMyStation }

Expand All @@ -52,9 +53,13 @@ destructor TMyStation.Destroy;


procedure TMyStation.Init;
var
dxrec : TDXCCRec;
begin
inherited Init;

dxrec := nil;

MyCall := Ini.Call;
NR := 1;
RST := 599;
Expand All @@ -71,6 +76,11 @@ procedure TMyStation.Init;
OpName := HamName;
Exch1 := '3A';
Exch2 := 'OR';

// load my Entity string; used to filter user-text status messages
MyEntity := '';
if gDXCCList.FindRec(dxrec, MyCall) then
MyEntity := dxrec.Entity;
end;


Expand Down