// COLUMN_THREADITEM: array[0..3] of string = ('\83X\83\8c\83b\83h\96¼', '\83J\83E\83\93\83g', '\8f\84\89ñ\97\\96ñ', '\91O\89ñ\8f\84\89ñ\93ú\8e\9e');
function BBSsFindBoardFromBBSID(
- inBBSID : string
+ inBBSID : string
) : TBoard;
var
- i, bound : Integer;
+ i : Integer;
begin
- bound := Length( BBSs ) - 1;
- for i := 0 to bound do begin
+ for i := Length( BBSs ) - 1 downto 0 do begin
Result := BBSs[ i ].FindBBSID( inBBSID );
if Result <> nil then
Exit;
end;
function BBSsFindBoardFromURL(
- inURL : string
+ inURL : string
) : TBoard;
var
- i, bound : Integer;
+ i : Integer;
begin
- bound := Length( BBSs ) - 1;
- for i := 0 to bound do begin
+ for i := Length( BBSs ) - 1 downto 0 do begin
Result := BBSs[ i ].FindBoardFromURL( inURL );
if Result <> nil then
Exit;
end;
function BBSsFindBoardFromTitle(
- inTitle : string
+ inTitle : string
) : TBoard;
var
- i, bound : Integer;
+ i : Integer;
begin
- bound := Length( BBSs ) - 1;
- for i := 0 to bound do begin
+ for i := Length( BBSs ) - 1 downto 0 do begin
Result := BBSs[ i ].FindBoardFromTitle( inTitle );
if Result <> nil then
Exit;
end;
function BBSsFindThreadFromURL(
- inURL : string
+ inURL : string
) : TThreadItem;
var
- i, bound : Integer;
+ i : Integer;
begin
- bound := Length( BBSs ) - 1;
- for i := 0 to bound do begin
+ for i := Length( BBSs ) - 1 downto 0 do begin
Result := BBSs[ i ].FindThreadFromURL( inURL );
if Result <> nil then
Exit;
function TBBS.FindBBSID(BBSID: string): TBoard;
var
- i: Integer;
- Category: TCategory;
- Board: TBoard;
+ i : Integer;
begin
- Result := nil;
- for i := 0 to Count - 1 do begin
- Category := Items[i];
- Board := Category.FindBBSID(BBSID);
- if Board <> nil then begin
- Result := Board;
+ for i := Count - 1 downto 0 do begin
+ Result := Items[ i ].FindBBSID(BBSID);
+ if Result <> nil then
Exit;
- end;
end;
+ Result := nil;
end;
//*************************************************************************
function TBBS.FindBoardFromTitle(Title: string): TBoard;
var
i: Integer;
- Category: TCategory;
- Board: TBoard;
begin
- Result := nil;
- for i := 0 to Count - 1 do begin
- Category := Items[i];
- Board := Category.FindBoardFromTitle(Title);
- if Board <> nil then begin
- Result := Board;
+ for i := Count - 1 downto 0 do begin
+ Result := Items[ i ].FindBoardFromTitle(Title);
+ if Result <> nil then
Exit;
- end;
end;
+ Result := nil;
end;
//*************************************************************************
//*************************************************************************)
function TBBS.FindBoardFromURL(inURL: string): TBoard;
var
- i: Integer;
- Category: TCategory;
- Board: TBoard;
+ i : Integer;
begin
- Result := nil;
- for i := 0 to Count - 1 do begin
- Category := Items[i];
- Board := Category.FindBoardFromURL(inURL);
- if Board <> nil then begin
- Result := Board;
+ for i := Count - 1 downto 0 do begin
+ Result := Items[ i ].FindBoardFromURL( inURL );
+ if Result <> nil then
Exit;
- end;
end;
+ Result := nil;
end;
//*************************************************************************
//*************************************************************************)
function TBBS.FindThreadFromURL(inURL: string): TThreadItem;
var
- i: Integer;
+ i : Integer;
begin
- for i := 0 to Count - 1 do begin
+ for i := Count - 1 downto 0 do begin
Result := Items[ i ].FindThreadFromURL( inURL );
if Result <> nil then
Exit;
function TCategory.FindBBSID(BBSID: string): TBoard;
var
- i: integer;
+ i : integer;
begin
- Result := nil;
- for i := 0 to Count - 1 do begin
+ for i := Count - 1 downto 0 do begin
if Items[i].FBBSID = BBSID then begin
Result := Items[i];
Exit;
end;
end;
+ Result := nil;
end;
//*************************************************************************
//*************************************************************************)
function TCategory.FindBoardFromTitle(Title: string): TBoard;
var
- i: integer;
+ i : integer;
begin
- Result := nil;
- for i := 0 to Count - 1 do begin
+ for i := Count - 1 downto 0 do begin
if Items[i].FTitle = Title then begin
Result := Items[i];
Exit;
end;
end;
+ Result := nil;
end;
//*************************************************************************
//*************************************************************************)
function TCategory.FindBoardFromURL(inURL: string): TBoard;
var
- i: integer;
+ i : Integer;
begin
- Result := nil;
- for i := 0 to Count - 1 do begin
+ for i := Count - 1 downto 0 do begin
if Pos( Items[i].URL, inURL ) = 1 then begin
Result := Items[i];
Exit;
end;
end;
+ Result := nil;
end;
//*************************************************************************
i : Integer;
begin
- for i := 0 to Count - 1 do begin
+ for i := Count - 1 downto 0 do begin
Result := Items[ i ].FindThreadFromURL( inURL );
if Result <> nil then
Exit;
inURL : string
);
var
- foundPos : Integer;
protocol, host, path, document, port, bookmark : string;
- BBSID, BBSKey : string;
+ BBSID : string;
begin
Create;
// \83v\83\89\83O\83C\83\93\82É TBoardItem \82ª\8dì\90¬\82³\82ê\82½\82±\82Æ\82ð\93`\82¦\82é
if inPlugIn = nil then begin
- // subject.txt \82Ì\95Û\91¶\83p\83X\82ð\90Ý\92è
- GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark );
- if GikoSys.Is2chHost( host ) then
- FilePath :=
- IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder ) +
- BBS2CH_LOG_FOLDER + PATH_DELIM + BBSID + PATH_DELIM + SUBJECT_FILENAME
- else
- FilePath :=
- IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder ) +
- EXTERNAL_LOG_FOLDER + PATH_DELIM + host + PATH_DELIM + BBSID + PATH_DELIM + SUBJECT_FILENAME
+ // subject.txt \82Ì\95Û\91¶\83p\83X\82ð\90Ý\92è
+ GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark );
+ if GikoSys.Is2chHost( host ) then
+ FilePath :=
+ IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder ) +
+ BBS2CH_LOG_FOLDER + PATH_DELIM + BBSID + PATH_DELIM + SUBJECT_FILENAME
+ else
+ FilePath :=
+ IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder ) +
+ EXTERNAL_LOG_FOLDER + PATH_DELIM + host + PATH_DELIM + BBSID + PATH_DELIM + SUBJECT_FILENAME
end else begin
inPlugIn.CreateBoardItem( DWORD( Self ) );
end;
if not IsThreadDatRead then
GikoSys.ReadSubjectFile( Self );
- for i := 0 to Count - 1 do begin
+ for i := Count - 1 downto 0 do begin
if Pos( Items[ i ].URL, inURL ) = 1 then begin
Result := Items[ i ];
Exit;
else
FilePath :=
IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder ) +
- EXTERNAL_LOG_FOLDER + PATH_DELIM + host + PATH_DELIM + BBSID + PATH_DELIM + BBSKey + '.dat'
+ EXTERNAL_LOG_FOLDER + PATH_DELIM + host + PATH_DELIM + BBSID + PATH_DELIM + BBSKey + '.dat';
+ FileName := BBSKey + '.dat';
+ IsLogFile := FileExists( FilePath );
end;
end else begin
// \83v\83\89\83O\83C\83\93\82É TThreadItem \82ª\8dì\90¬\82³\82ê\82½\82±\82Æ\82ð\93`\82¦\82é