From 559713a5941ac092032d66ae9bff707c9e9c8392 Mon Sep 17 00:00:00 2001 From: h677 Date: Sat, 7 Aug 2004 12:55:48 +0000 Subject: [PATCH] =?utf8?q?livedoor=E3=81=AEURL=E3=81=A7=E3=82=82=E8=AA=AD?= =?utf8?q?=E3=81=BF=E8=BE=BC=E3=82=81=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?utf8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr | 55 ++++++++++++++++++------- 1 file changed, 41 insertions(+), 14 deletions(-) diff --git a/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr b/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr index 25ada01..1377673 100644 --- a/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr +++ b/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr @@ -3,7 +3,7 @@ library ShitarabaJBBSPlugIn; { ShitarabaJBBSPlugIn ‚µ‚½‚ç‚Ώˆ—ƒ†ƒjƒbƒg - $Id: ShitarabaJBBSPlugIn.dpr,v 1.24 2004/08/02 16:01:14 h677 Exp $ + $Id: ShitarabaJBBSPlugIn.dpr,v 1.25 2004/08/07 12:55:48 h677 Exp $ } uses @@ -77,7 +77,7 @@ const MAJOR_VERSION = 1; MINOR_VERSION = 1; RELEASE_VERSION = 'alpha'; - REVISION_VERSION = 2; + REVISION_VERSION = 3; SYNCRONIZE_MENU_CAPTION = '‚µ‚½‚ç‚ÎJBBS”XV'; @@ -278,7 +278,7 @@ var uri : TIdURI; uriList : TStringList; foundPos : Integer; - i : Integer; +// i : Integer; const BBS_HOST_1 = 'jbbs.shitaraba.com'; BBS_HOST_2 = 'jbbs.livedoor.com'; @@ -792,7 +792,7 @@ begin end; end; //Title := tmpTitle; - tS := 0; tE := 0; + //tS := 0; tE := 0; //–{•¶‚̎擾
‚ÌŽŸ‚̍s‚©‚ç
‚Ì‘O‚̍s‚Ü‚Å for i := tmpHTML.Count - 1 downto 0 do begin tmpLine := AnsiLowerCase(tmpHTML[i]); @@ -1145,22 +1145,30 @@ function TShitarabaThreadItem.GetBoardURL : string; var uri : TIdURI; uriList : TStringList; + tmphost: String; begin uri := TIdURI.Create( ReadURL ); uriList := TStringList.Create; try ExtractHttpFields( ['/', '?'], [], uri.Path, uriList ); + + tmphost := uri.Host; + + if tmphost = 'jbbs.livedoor.com' then + tmphost := 'jbbs.shitaraba.com'; + if( AnsiPos('.html', uri.Document) = 0 ) then begin //’ʏí FileName := uriList[ 5 ] + '.dat'; + // http://jbbs.livedoor.com/bbs/read.cgi/computer/351/1090404452/l100 // http://jbbs.shitaraba.com/bbs/read.cgi/game/1578/1067968274/l100 // http://jbbs.shitaraba.com/game/1000/subject.txt Result := CreateResultString( - uri.Protocol + '://' + uri.Host + '/' + uriList[ 3 ] + '/' + uriList[ 4 ] + '/' ); + uri.Protocol + '://' + tmphost + '/' + uriList[ 3 ] + '/' + uriList[ 4 ] + '/' ); end else begin //http://jbbs.shitaraba.com/game/1578/storage/1086710948.html Result := CreateResultString( - uri.Protocol + '://' + uri.Host + CustomStringReplace(uri.Path, '/storage', '')); + uri.Protocol + '://' + tmphost + CustomStringReplace(uri.Path, '/storage', '')); end; finally @@ -1209,7 +1217,7 @@ var uri : TIdURI; uriList : TStringList; foundPos : Integer; - dir : string; + dir, tmphost : string; begin foundPos := AnsiPos( '?', URL ); @@ -1220,9 +1228,14 @@ begin try ExtractHttpFields( ['/'], [], uri.Path, uriList ); dir := uriList[ 1 ]; + + tmphost := uri.Host; + if tmphost = 'jbbs.livedoor.com' then + tmphost := 'jbbs.shitaraba.com'; + ExtractHttpFields( ['&'], [], Copy( URL, foundPos + 1, MaxInt ), uriList ); Result := - uri.Protocol + '://' + uri.Host + '/bbs/read.cgi/' + + uri.Protocol + '://' + tmphost + '/bbs/read.cgi/' + dir + '/' + uriList.Values[ 'BBS' ] + '/' + uriList.Values[ 'KEY' ] + '/l100'; finally uri.Free; @@ -1237,15 +1250,20 @@ begin uriList := TStringList.Create; try ExtractHttpFields( ['/'], [], uri.Path, uriList ); + + tmphost := uri.Host; + if tmphost = 'jbbs.livedoor.com' then + tmphost := 'jbbs.shitaraba.com'; + if( AnsiPos(THREAD_MARK, URL) > 0) and (uriList.Count > 5) then begin Result := - uri.Protocol + '://' + uri.Host + THREAD_MARK + '/' + + uri.Protocol + '://' + tmphost + THREAD_MARK + '/' + uriList[ 3 ] + '/' + uriList[ 4 ] + '/' + uriList[ 5 ] + '/l100'; end else if AnsiPos(THREAD_MARK, URL) = 0 then begin //ƒRƒR‚ʼnߋŽƒƒO‚©‚Ç‚¤‚©ƒ`ƒFƒbƒNH if(AnsiPos('.html/', uri.Path) > 0) then begin - Result := uri.Protocol + '://' + uri.Host + Copy(uri.Path, 1, Length(uri.Path) - 1); + Result := uri.Protocol + '://' + tmphost + Copy(uri.Path, 1, Length(uri.Path) - 1); end else Result := URL; end; @@ -1267,7 +1285,7 @@ var uri : TIdURI; uriList : TStringList; foundPos : Integer; - dir : string; + dir, tmphost : string; begin foundPos := AnsiPos( '?', URL ); @@ -1278,10 +1296,15 @@ begin try ExtractHttpFields( ['/'], [], uri.Path, uriList ); dir := uriList[ 1 ]; + + tmphost := uri.Host; + if tmphost = 'jbbs.livedoor.com' then + tmphost := 'jbbs.shitaraba.com'; + ExtractHttpFields( ['&'], [], Copy( URL, foundPos + 1, MaxInt ), uriList ); // http://jbbs.shitaraba.com/bbs/read.cgi?DIR=game&BBS=1578&KEY=1067968274 Result := - uri.Protocol + '://' + uri.Host + '/bbs/rawmode.cgi/' + + uri.Protocol + '://' + tmphost + '/bbs/rawmode.cgi/' + dir + '/' + uriList.Values[ 'BBS' ] + '/' + uriList.Values[ 'KEY' ] + '/'; finally uri.Free; @@ -1295,15 +1318,19 @@ begin uriList := TStringList.Create; try ExtractHttpFields( ['/'], [], uri.Path, uriList ); + + tmphost := uri.Host; + if tmphost = 'jbbs.livedoor.com' then + tmphost := 'jbbs.shitaraba.com'; // http://jbbs.shitaraba.com/bbs/read.cgi/game/1578/1067968274/l100 if( AnsiPos(THREAD_MARK, URL) > 0) and (uriList.Count > 5) then begin Result := - uri.Protocol + '://' + uri.Host + '/bbs/rawmode.cgi/' + + uri.Protocol + '://' + tmphost + '/bbs/rawmode.cgi/' + uriList[ 3 ] + '/' + uriList[ 4 ] + '/' + uriList[ 5 ] + '/'; end else if AnsiPos(THREAD_MARK, URL) = 0 then begin //ƒRƒR‚ʼnߋŽƒƒO‚©‚Ç‚¤‚©ƒ`ƒFƒbƒNH if(AnsiPos('.html/', uri.Path) > 0) then begin - Result := uri.Protocol + '://' + uri.Host + Copy(uri.Path, 1, Length(uri.Path) - 1); + Result := uri.Protocol + '://' + tmphost + Copy(uri.Path, 1, Length(uri.Path) - 1); end else Result := URL; end; -- 2.11.0