• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

ギコナビ


Commit MetaInfo

Revisão728664c7d70d29e58092b33ba69a2a2e4ad187f1 (tree)
Hora2004-09-07 01:41:41
Autorh677 <h677>
Commiterh677

Mensagem de Log

したらばJBBS用の過去ログのコード追加

Mudança Sumário

Diff

--- a/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr
+++ b/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr
@@ -3,7 +3,7 @@ library ShitarabaJBBSPlugIn;
33 {
44 ShitarabaJBBSPlugIn
55 ‚µ‚½‚ç‚Ώˆ—ƒ†ƒjƒbƒg
6- $Id: ShitarabaJBBSPlugIn.dpr,v 1.29 2004/08/27 21:01:46 h677 Exp $
6+ $Id: ShitarabaJBBSPlugIn.dpr,v 1.30 2004/09/06 16:41:41 h677 Exp $
77 }
88
99 uses
@@ -636,6 +636,24 @@ begin
636636 finally
637637 downResult.Free;
638638 end;
639+ end else if responseCode = 302 then begin
640+ //http://jbbs.shitaraba.com/bbs/read.cgi/game/3477/1077473358/
641+ //http://jbbs.shitaraba.com/game/bbs/read.cgi?BBS=3477&KEY=1077473358
642+ //http://jbbs.shitaraba.com/game/3477/storage/1077473358.html
643+ //‰ß‹ŽƒƒO
644+ uri := TIdURI.Create( ReadURL );
645+ uriList := TStringList.Create;
646+ try
647+ ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
648+ URL := uri.Protocol + '://' + uri.Host +
649+ '/' + uriList[3] + '/' + uriList[4] + '/storage/' + uriList[ 5 ] + '.html';
650+ finally
651+ uriList.Free;
652+ uri.Free;
653+ end;
654+ uri := TIdURI.Create( ReadURL );
655+ Result := StorageDownload(uri.Path, uri.Document);
656+ uri.Free;
639657 end else if responseCode = 304 then begin
640658 Result := dsNotModify;
641659 end;
@@ -794,7 +812,7 @@ begin
794812 end;
795813 tmpHTML.Delete(i);
796814 end;
797- j := 0;
815+ j := 0;
798816 for i := 0 to tmpHTML.Count - 1 do begin
799817 tmpLine := AnsiLowerCase(tmpHTML[i]);
800818 tS := AnsiPos('<dl>', tmpLine);
@@ -915,31 +933,27 @@ begin
915933
916934 if downResult.Count > 0 then begin
917935 if FileExists( FilePath ) then
918- logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite )
919- else
920- logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite );
936+ DeleteFile(FilePath);
937+
938+ logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite );
921939 try
922- logStream.Position := logStream.Size;
940+ logStream.Position := 0;
923941 logStream.Write( PChar( downResult.Text )^, Length( downResult.Text ) );
924942 finally
925943 logStream.Free;
926944 end;
927945
928- if Count = 0 then
929- // V‹K
930- Result := dsComplete
931- else
932- // ’Ç‹L
933- Result := dsDiffComplete;
946+ // V‹K
947+ Result := dsComplete;
934948
935- Size := Size + Length( downResult.Text );
949+ Size := Length( downResult.Text );
936950 // CGI ‚©‚ç‚͐³‚µ‚¢“ú•t‚ª“¾‚ç‚ê‚È‚¢‚Ì‚ÅŒ»Ý‚ɐݒè
937951 LastModified := Now;
938952
939953
940954
941- NewReceive := Count + 1;
942- Count := Count + downResult.Count;
955+ NewReceive := 1;
956+ Count := downResult.Count;
943957 NewResCount := downResult.Count;
944958 //http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1086710948/l100
945959 //http://jbbs.livedoor.com/game/1578/storage/1086710948.html