The bug here is which appeared since the section [special:import] is active in the template by default, about is the template in the course of use, the concerned section is systematically executed, to convince itself, it is enough to choose a personalized template and to delete the group ' can exchange password ', then we save the options (in any configuration) and we restart HFS, it damned counts re-appears as if by magic.
With the following small modifications, everything becomes again normal:
The section is executed during restore the default template, and so only during a first installation of hfs, or in case hfs.ini is deleted and in case the base of register of hfs is empty.
function Tmainfrm.finalInit():boolean;
......
// CTRL avoids the only1instance setting
if not holdingKey(VK_CONTROL)
and only1instanceChk.checked and not mono.master then
begin
result:=FALSE;
quitASAP:=TRUE;
end;
//disable the two next lines, they are moved
//tplImport:=TRUE; //execute import script if any
// setTplText(defaultTpl);
processParams_before(params);
.....................................
procedure TmainFrm.Restoredefault1Click(Sender: TObject);
begin
if msgDlg('Continue?', MB_ICONQUESTION+MB_YESNO) = MRNO then exit;
tplFilename:='';
tplLast:=-1;
tplImport:=TRUE; // execute import script if any //this line was missing here
setStatusBarText('The template has been reset');
end;
.....................................
function loadCfg(var ini,tpl:string):boolean;
....
begin
result:=TRUE;
ipsEverConnected.text:=loadfile(IPS_FILE);
.......
//mars the two lines moved here
tplImport:=TRUE; // execute import script if any
setTplText(defaultTpl);
result:=FALSE;
end; // loadCfg