OSDN Git Service

Libdoor.comへの変更
authorh677 <h677>
Mon, 2 Aug 2004 16:01:14 +0000 (16:01 +0000)
committerh677 <h677>
Mon, 2 Aug 2004 16:01:14 +0000 (16:01 +0000)
res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr

index c1c1445..25ada01 100644 (file)
@@ -3,7 +3,7 @@ library ShitarabaJBBSPlugIn;
 {
        ShitarabaJBBSPlugIn
        \82µ\82½\82ç\82Î\8f\88\97\9d\83\86\83j\83b\83g
-       $Id: ShitarabaJBBSPlugIn.dpr,v 1.23 2004/07/07 13:35:01 h677 Exp $
+       $Id: ShitarabaJBBSPlugIn.dpr,v 1.24 2004/08/02 16:01:14 h677 Exp $
 }
 
 uses
@@ -278,8 +278,10 @@ var
        uri                             : TIdURI;
        uriList         : TStringList;
        foundPos        : Integer;
+       i                       : Integer;
 const
-       BBS_HOST                = 'jbbs.shitaraba.com';
+       BBS_HOST_1      = 'jbbs.shitaraba.com';
+       BBS_HOST_2      = 'jbbs.livedoor.com';
        THREAD_MARK     = '/bbs/read.cgi';
 begin
 
@@ -289,8 +291,19 @@ begin
                uriList := TStringList.Create;
                try
                        ExtractHttpFields( ['/'], [], uri.Path, uriList );
-                       foundPos := AnsiPos( BBS_HOST, uri.Host );
-                       if (foundPos > 0) and (Length( uri.Host ) - foundPos + 1 = Length( BBS_HOST )) then begin
+                       if (AnsiPos( BBS_HOST_1, uri.Host ) > 0) and (Length( uri.Host ) - AnsiPos( BBS_HOST_1, uri.Host ) + 1 = Length( BBS_HOST_1 )) then begin
+                               foundPos := AnsiPos( THREAD_MARK, inURL );
+
+                               if foundPos > 0 then
+                                       Result := atThread
+                               else if (uriList.Count > 2) and (AnsiPos('.html', uri.Document) > 0) then
+                                       Result := atThread
+                               else if uriList.Count > 2 then  // \8dÅ\8cã\82ª '/' \82Å\95Â\82ß\82ç\82ê\82Ä\82é\82È\82ç 4
+                                       Result := atBoard
+                               else
+                                       Result := atBBS;
+
+                       end else if (AnsiPos( BBS_HOST_2, uri.Host ) > 0) and (Length( uri.Host ) - AnsiPos( BBS_HOST_2, uri.Host ) + 1 = Length( BBS_HOST_2 )) then begin
                                foundPos := AnsiPos( THREAD_MARK, inURL );
 
                                if foundPos > 0 then
@@ -305,6 +318,7 @@ begin
                        end else begin
                                Result := atNoAccept;
                        end;
+
                finally
                        uri.Free;
                        uriList.Free;