• 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

Revision8b9cdb000bccef82f5e9a23e879158c3cdfabe76 (tree)
Time2008-07-06 22:29:17
Authorh677 <h677>
Commiterh677

Log Message

まちBBSの新URL(PATH_INFO)に対応

Change Summary

Incremental Difference

--- a/res/ExternalBoardPlugIn/MachiBBSPlugIn.dpr
+++ b/res/ExternalBoardPlugIn/MachiBBSPlugIn.dpr
@@ -83,7 +83,7 @@ const
8383 MAJOR_VERSION = 1;
8484 MINOR_VERSION = 0;
8585 RELEASE_VERSION = 'beta';
86- REVISION_VERSION = 18;
86+ REVISION_VERSION = 19;
8787
8888 // =========================================================================
8989 // ŽG—pŠÖ”
@@ -269,6 +269,7 @@ var
269269 const
270270 BBS_HOST = 'machi.to';
271271 THREAD_MARK = '/bbs/read.pl';
272+ THREAD_MARK2= '/bbs/read.cgi';
272273 begin
273274
274275 try
@@ -280,6 +281,10 @@ begin
280281 foundPos := AnsiPos( BBS_HOST, uri.Host );
281282 if (foundPos > 0) and (Length( uri.Host ) - foundPos + 1 = Length( BBS_HOST )) then begin
282283 foundPos := Pos( THREAD_MARK, inURL );
284+ if (foundPos = 0) then begin
285+ // VURL‘Ήž
286+ foundPos := Pos( THREAD_MARK2, inURL );
287+ end;
283288 if foundPos > 0 then
284289 Result := atThread
285290 else if (uriList.Count > 1) and (uri.Path <> '/') then // ÅŒã‚ª '/' ‚ŕ‚߂ç‚ê‚Ä‚é‚È‚ç 3
@@ -309,9 +314,10 @@ procedure OnExtractBoardURL(
309314 var
310315 uri : TIdURI;
311316 uriList : TStringList;
312- URL : String;
317+ URL : String;
313318 const
314319 THREAD_MARK = '/bbs/read.pl';
320+ THREAD_MARK2= '/bbs/read.cgi';
315321 begin
316322 URL := string(inURL);
317323 if AnsiPos(THREAD_MARK, URL) > 0 then begin
@@ -333,6 +339,27 @@ begin
333339 uri.Free;
334340 uriList.Free;
335341 end;
342+ end else if AnsiPos(THREAD_MARK2, URL) > 0 then begin
343+ if Copy( inURL, Length( inURL ), 1 ) = '/' then
344+ uri := TIdURI.Create( URL )
345+ else
346+ uri := TIdURI.Create( URL + '/' );
347+
348+ uriList := TStringList.Create;
349+ try
350+ // http://kanto.machi.to/bbs/read.cgi/kana/1215253035/l50
351+ // http://kanto.machi.to/kana/
352+ uriList.Delimiter := '/';
353+ uriList.DelimitedText := uri.Path;
354+ URL := uri.Protocol + '://' + uri.Host + '/';
355+ if (uriList.Count >= 4) then begin
356+ URL := URL + uriList[3] + '/';
357+ end;
358+ outURL := CreateResultString(URL);
359+ finally
360+ uri.Free;
361+ uriList.Free;
362+ end;
336363 end else begin
337364 outURL := CreateResultString(URL);
338365 end;
@@ -873,6 +900,8 @@ var
873900 uri : TIdURI;
874901 uriList : TStringList;
875902 foundPos : Integer;
903+const
904+ THREAD_MARK2= '/bbs/read.cgi';
876905 begin
877906
878907 foundPos := AnsiPos( '?', URL );
@@ -888,7 +917,26 @@ begin
888917 uri.Free;
889918 uriList.Free;
890919 end;
891- end;
920+ end else begin
921+ // VŒ`Ž® ?
922+ foundPos := AnsiPos(THREAD_MARK2, URL);
923+ if (foundPos > 0) then begin
924+ uri := TIdURI.Create( URL );
925+ uriList := TStringList.Create;
926+ try
927+ uriList.Delimiter := '/';
928+ uriList.DelimitedText := uri.Path;
929+ if (uriList.Count >= 5) then begin
930+ Result :=
931+ uri.Protocol + '://' + uri.Host + '/bbs/read.pl?' +
932+ 'BBS=' + uriList[3] + '&KEY=' + uriList[4];
933+ end;
934+ finally
935+ uri.Free;
936+ uriList.Free;
937+ end;
938+ end;
939+ end;
892940
893941 end;
894942
Binary files a/res/ExternalBoardPlugIn/MachiBBSPlugIn.res and b/res/ExternalBoardPlugIn/MachiBBSPlugIn.res differ