function FindBBSID(const BBSID: string): TBoard;
function FindBoardFromTitle(const Title: string): TBoard;
function FindBoardFromTitleAndCategory(const CategoryTitle: string; const BoardTitle: string): TBoard;
+ function FindBoardFromURLAndCategory(const CategoryTitle: string; const BoardURL: string): TBoard;
function FindBoardFromURL(const inURL: string): TBoard;
function FindThreadFromURL(const inURL : string ) : TThreadItem;
function FindThreadItem(const BBSID, FileName: string): TThreadItem;
function FindBBSID(const BBSID: string): TBoard;
function FindBoardFromTitle(const Title: string): TBoard;
function FindBoardFromURL(const inURL: string): TBoard;
+ function FindBoardFromURL2(const inURL: string): TBoard;
function FindThreadFromURL(const inURL : string ) : TThreadItem;
function IsMidoku: Boolean;
end;
//*************************************************************************
+// \83J\83e\83S\83\8a\96¼\82Æ\94ÂURL\82Ì\88ê\92v\82·\82é\94Â\82ð\92T\82·
+//*************************************************************************)
+function TBBS.FindBoardFromURLAndCategory(const CategoryTitle: string; const BoardURL: string): TBoard;
+var
+ i: Integer;
+begin
+ if not IsBoardFileRead then
+ GikoSys.ReadBoardFile( Self );
+ for i := Count - 1 downto 0 do begin
+ if AnsiCompareStr(Items[ i ].Title, CategoryTitle) = 0 then begin
+ Result := Items[ i ].FindBoardFromURL2(BoardURL);
+ if Result <> nil then
+ Exit;
+ end;
+ end;
+ Result := nil;
+end;
+
+//*************************************************************************
// URL \82ð\8eó\82¯\95t\82¯\82é\94Â\82ð\92T\82·
//*************************************************************************)
function TBBS.FindBoardFromURL(const inURL: string): TBoard;
end;
//*************************************************************************
+// \83z\83X\83g\96¼\82ð\8f\9c\82¢\82½URL\82Å\94Â\82ð\92T\82·\81i2ch.net/bbspink.com\8cÀ\92è\81j
+//*************************************************************************)
+function TCategory.FindBoardFromURL2(const inURL: string): TBoard;
+const
+ HOST_NAME: array[0..1] of string = ('.2ch.net', '.bbspink.com');
+var
+ i : Integer;
+ idx: Integer;
+ chkURL: String;
+ chkLen: Integer;
+begin
+ Result := nil;
+ for i := 0 to Length(HOST_NAME) - 1 do begin
+ idx := Pos(HOST_NAME[i], inURL);
+ if (idx > 0) then begin
+ chkLen := Length(inURL) - idx + 1;
+ chkURL := Copy(inURL, idx, chkLen);
+ Break;
+ end;
+ end;
+ if (chkLen > 0) then begin
+ for i := 0 to Count - 1 do begin
+ idx := Pos(ChkURL, Strings[i]);
+ if (idx > 0) then begin
+ if (Length(Strings[i]) - idx + 1 = chkLen) then begin
+ Result := TBoard( Objects[ i ] );
+ Break;
+ end;
+ end;
+ end;
+ end;
+end;
+
+//*************************************************************************
// URL \82ð\8eó\82¯\95t\82¯\82é\83X\83\8c\83b\83h\82ð\92T\82·
//*************************************************************************)
function TCategory.FindThreadFromURL(const inURL: string): TThreadItem;
else if ( AnsiPos('\83N\83b\83L\81[\82ª\82È\82¢\82©\8aú\8cÀ\90Ø\82ê\82Å\82·', ResponseText) > 0) or
(AnsiPos('<title>\83N\83b\83L\81[\8am\94F\81I</title>', ResponseText) > 0) or
(AnsiPos('<title>\81¡\83N\83b\83L\81[\8am\94F\81I\81¡</title>', ResponseText) > 0) or
+ (AnsiPos('(cookie\82ð\90Ý\92è\82·\82é\82Æ\82±\82Ì\89æ\96Ê\82Í\82Å\82È\82\82È\82è\82Ü\82·\81B)', ResponseText) > 0) or
(AnsiPos(RES2CH_COOKIE, ResponseText) > 0) then
Result := grtCookie
else if (AnsiPos('<font size=+2 color=#FF0000>\8f\91\82«\8d\9e\82Ý\83`\83F\83b\83N\81I </font>', ResponseText) > 0) or
else if (AnsiPos('\81E\93\8a\8de\8eÒ\82Í\81A\8cf\8e¦\94Â\89^\89c\8eÒ\82É\91Î\82µ\82Ä\81A\92\98\8dì\8eÒ\90l\8ai\8c \82ð\88ê\90Ø\8ds\8eg\82µ\82È\82¢\82±\82Æ\82ð\8f³\91ø\82µ\82Ü\82·\81B<br>', ResponseText) > 0) or
(AnsiPos('\81i\92\98\8dì\8c \96@\91æ21\8fð\82È\82¢\82µ\91æ28\8fð\82É\8bK\92è\82³\82ê\82é\8c \97\98\82à\8aÜ\82Þ\81j\82»\82Ì\91¼\82Ì\8c \97\98\82É\82Â\82«\81A', ResponseText) > 0) then
Result := grtCookie
- else if (AnsiPos('\8f\91\82«\82±\82Ý\81\95\83N\83b\83L\81[\8am\94F', ResponseText) > 0) or
- (AnsiPos('(cookie\82ð\90Ý\92è\82·\82é\82Æ\82±\82Ì\89æ\96Ê\82Í\82Å\82È\82\82È\82è\82Ü\82·\81B)', ResponseText) > 0) then
- Result := grtCookie
else
Result := grtError;
end;