anchor.diff:          AppEvents.LogException(E);
       end;
   
  -    writelog('Konfigurace načtena', WR_DATA);
  +    writelog('Globální konfigurace načtena', WR_DATA);
     finally
       ini.Free();
     end;
    end;
   
  -procedure TGlobalConfig.SaveCfgToFile(IniSave:string);
  +procedure TGlobalConfig.LoadCfgPtServer(ini: TMemIniFile);
  +var strs: TStringList;
  +    key, str: string;
  + begin
  +  try
  +    PtServer.port := ini.ReadInteger('PTServer', 'port', _PT_DEFAULT_PORT);
  +  except
  +    on E:EPTActive do
  +      writeLog('PT ERR: '+E.Message, WR_PT);
  +  end;
  +
  +  PtServer.compact := ini.ReadBool('PTServer', 'compact', _PT_COMPACT_RESPONSE);
  +
  +  strs := TStringList.Create();
  +  try
  +    ini.ReadSection('PTServerStaticTokens', strs);
  +    for key in strs do
  +     begin
  +      try
  +        str := ini.ReadString('PTServerStaticTokens', key, '');
  +        if (str <> '') then
  +          PtServer.AccessTokenAdd(str);
  +      except
  +        on E:Exception do
  +          writelog('PTserver: nepodařilo se přidat token '+str+' ('+E.Message+')', WR_ERROR);
  +      end;
  +     end;
  +  finally
  +    strs.Free();
  +  end;
  + end;
  +
  +procedure TGlobalConfig.SaveCfgToFile(filename:string);
   var ini:TMemIniFile;
    begin
  -  ini := TMemIniFile.Create(IniSave, TEncoding.UTF8);
  +  ini := TMemIniFile.Create(filename, TEncoding.UTF8);
   
     try
       ModCas.SaveData(ini);
  
positive.code:   end;
    F_Main.E_dataload_soupr.Text := ExtractRelativePath(ExtractFilePath(Application.ExeName), read);
  
    //nacitani bloku
    F_Splash.AddStav('Načítám databázi bloků...');
    read := inidata.ReadString(_INIDATA_PATHS_DATA_SECTION, 'bloky', 'data\bloky.ini');
    read2 := inidata.ReadString(_INIDATA_PATHS_STATE_SECTION, 'bloky', 'stav\bloky.ini');
  
negative.code: var read,read2:string;
   begin
    F_Splash.AddStav('Načítám konfiguraci...');
  
    read := inidata.ReadString(_INIDATA_PATHS_DATA_SECTION, 'konfigurace', 'data\konfigurace.ini');
    try
      GlobalConfig.LoadCfgFromFile(read);
  