From 5aa89e59c9e124b99eccf5b3c2f7b63c707eaadb Mon Sep 17 00:00:00 2001 From: h677 Date: Sun, 25 Jun 2006 15:57:58 +0000 Subject: [PATCH 1/1] =?utf8?q?fusianasan=E3=81=AE=E3=83=81=E3=82=A7?= =?utf8?q?=E3=83=83=E3=82=AF=E3=81=AE=E9=A0=86=E7=95=AA=E3=81=8C=E3=81=8A?= =?utf8?q?=E3=81=8B=E3=81=97=E3=81=84=E5=95=8F=E9=A1=8C=E3=81=AE=E4=BF=AE?= =?utf8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Editor.pas | 215 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 104 insertions(+), 111 deletions(-) diff --git a/Editor.pas b/Editor.pas index c8329d0..0a0c78a 100644 --- a/Editor.pas +++ b/Editor.pas @@ -118,7 +118,7 @@ type LocalEdit: TMemo; N6: TMenuItem; LocalRuleBrowse: TMenuItem; - ToolButton4: TToolButton; + ToolButton4: TToolButton; ToolButton6: TToolButton; SaveNameMailAction: TAction; ToolButton7: TToolButton; @@ -840,7 +840,6 @@ var body : TStringList; Remote : String; ABoard : TBoard; - tmpRawheader: string; {Protocol,Host, Path, Document, Port, Bookmark : String;} begin FAbort := False; @@ -852,7 +851,7 @@ begin Board := FThreadItem.ParentBoard; - tmpRawheader := ''; +// tmpRawheader := ''; InitIdHTTP(Indy); if FThreadItem = nil then begin URL := FBoard.GetSendURL; @@ -910,35 +909,24 @@ begin try FDebugStrReceive := ''; FDebugStrSend := ''; - GetSendData(Source); - IdAntiFreeze.Active := True; - try - Indy.Post(URL, Source, TextStream); - finally - IdAntiFreeze.Active := False; - end; - ResponseText := TextStream.DataString; - ResultType := GetResultType(ResponseText); - - //MsgResult‰Šú‰» - MsgResult := IDNO; - //ƒtƒVƒAƒiƒgƒ‰ƒbƒvŒx(LocalMode) by ’èŠú•Ö - if GikoSys.Setting.LocalTrapAtt then begin - if LFusianaGet(Namae) then begin - MsgResult := MsgBox( Handle, MSG_FUSIANA, 'î•ñ', - MB_YESNO or MB_ICONQUESTION); - if MsgResult = IDNO then begin - CancelSend( Board, SysMenu ); - Exit; + if (FirstWriting) then begin + //ƒtƒVƒAƒiƒgƒ‰ƒbƒvŒx(LocalMode) by ’èŠú•Ö + if GikoSys.Setting.LocalTrapAtt then begin + if LFusianaGet(Namae) then begin + MsgResult := MsgBox( Handle, MSG_FUSIANA, 'î•ñ', + MB_YESNO or MB_ICONQUESTION); + if MsgResult = IDNO then begin + CancelSend( Board, SysMenu ); + Exit; + end; end; - end; - if ((Namae = 'ŽRèÂ') or (Namae = 'fusianasan')) then begin - MsgResult := MsgBox(Handle, MSG_FUSIANA, 'î•ñ', - MB_YESNO or MB_ICONQUESTION); - if MsgResult = IDNO then begin - CancelSend( Board, SysMenu ); - Exit; + if ((Namae = 'ŽRèÂ') or (Namae = 'fusianasan')) then begin + MsgResult := MsgBox(Handle, MSG_FUSIANA, 'î•ñ', + MB_YESNO or MB_ICONQUESTION); + if MsgResult = IDNO then begin + CancelSend( Board, SysMenu ); + Exit; end; end; end; @@ -959,14 +947,10 @@ begin finally body.Free; end; - end; - + end else begin //Setting.txt‚ª‚È‚©‚Á‚½‚çŽæ“¾ //ŽI‚É•‰‰×‚ª‚©‚©‚è‚»‚¤... - if not FileExists(ABoard.GetSETTINGTXTFileName) then begin - //GetSETTINGTXTAction‚ðŒÄ‚яo‚·‚ÆIndy‚ª‰Šú‰»‚³‚ê‚é‚̂ŁA - //‚±‚±‚ÅCookie‚ð•Û‘¶‚µ‚È‚­‚Ä‚Í‚¢‚¯‚È‚¢ - tmpRawheader := Indy.Response.RawHeaders.Text; + //if not FileExists(ABoard.GetSETTINGTXTFileName) then begin GetSETTINGTXTAction.Execute; body := TStringList.Create; try @@ -976,88 +960,97 @@ begin end; finally body.Free; - end; - end; - - if Remote = 'fusianasan' then begin - MsgResult := MsgBox( - Handle, MSG_FUSIANA, 'î•ñ', - MB_YESNO or MB_ICONQUESTION); - if MsgResult = IDNO then begin - CancelSend( Board, SysMenu ); - Exit; - end; end; end; - if ResultType = grtOK then begin - if (GikoSys.Setting.UseSamba) and (Timer1.Enabled) then - WriteSambaTime(FHost, Now()); - State := gdsComplete; - end else if ResultType = grtCookie then begin - //ƒ‹[ƒv–hŽ~ - if not FirstWriting then - raise Exception.Create(''); - MsgResult := MsgBox( - Handle, - 'E“Še‚³‚ꂽ“à—e‚̓Rƒs[A•Û‘¶Aˆø—pA“]Ú“™‚³‚ê‚éê‡‚ª‚ ‚è‚Ü‚·B' + #13#10 + - 'E“Še‚ÉŠÖ‚µ‚Ä”­¶‚·‚éÓ”C‚Í‘S‚Ä“ŠeŽÒ‚É‹A‚µ‚Ü‚·B' + #13#10#13#10 + - '‘SÓ”C‚𕉂¤‚±‚Æ‚ð³‘ø‚µ‚ď‘‚«ž‚Ý‚Ü‚·‚©H', - 'î•ñ', - MB_YESNO or MB_ICONQUESTION); - if MsgResult = IDYES then begin - if (GikoSys.Setting.RemoteTrapAtt) and (tmpRawheader <> '') then begin - GetCookie(tmpRawheader, Board); - end else begin - GetCookie(Indy.Response.RawHeaders.Text, Board); - end; - if (Board.SPID = '') and (Board.PON = '') and (Board.Cookie = '') then - raise Exception.Create(''); - //‚à‚¤ˆê‰ñ‚±‚̃ƒ\ƒbƒh - Send(Board.Cookie, Board.SPID, Board.PON, False); - Exit; - end else begin + if Remote = 'fusianasan' then begin + MsgResult := MsgBox( + Handle, MSG_FUSIANA, 'î•ñ', + MB_YESNO or MB_ICONQUESTION); + if MsgResult = IDNO then begin CancelSend( Board, SysMenu ); Exit; - end; - end else if ResultType = grtCheck then begin - //ƒ‹[ƒv–hŽ~ - if not FirstWriting then - raise Exception.Create(''); - - MsgResult := MsgBox( - Handle, - '‘‚«ž‚Ý‚ÉŠÖ‚µ‚Ä‚Í—lX‚ȃƒOî•ñ‚ª‹L˜^‚³‚ê‚Ä‚¢‚Ü‚·B' + #13#10 + - '“Še‚ÉŠÖ‚µ‚Ä”­¶‚·‚éÓ”C‚Í‘S‚Ä“ŠeŽÒ‚É‹A‚µ‚Ü‚·B' + #13#10 + - 'Œö˜—Ç‘­‚É”½‚µ‚½‚èA‘¼l‚É–À˜f‚ð‚©‚¯‚鏑‚«ž‚݂͍T‚¦‚ĉº‚³‚¢B' + #13#10 + - '“Še‚³‚ꂽ“à—e‚̓Rƒs[E•Û‘¶Eˆø—pE“]Ú“™‚³‚ê‚éê‡‚ª‚ ‚è‚Ü‚·B' + #13#10 + - #13#10 + - '‘SÓ”C‚𕉂¤‚±‚Æ‚ð³‘ø‚µ‚ď‘‚«ž‚Ý‚Ü‚·‚©H', - 'Šm”F', - MB_YESNO or MB_ICONQUESTION); - - if MsgResult = IDYES then begin - if (GikoSys.Setting.RemoteTrapAtt) and (tmpRawheader <> '') then begin - GetCookie(tmpRawheader, Board); - end else begin - GetCookie(Indy.Response.RawHeaders.Text, Board); - end; + end; + end; + end; + end; - if (Board.SPID = '') and (Board.PON = '') and (Board.Cookie = '') then - raise Exception.Create(''); - Send(Board.Cookie, Board.SPID, Board.PON, False); - Exit; - end else begin - CancelSend( Board, SysMenu ); - Exit; - end; - end else begin - if (GikoSys.Setting.UseSamba) and (Timer1.Enabled) then - WriteSambaTime(FHost, Now()); - State := gdsError; - raise Exception.Create(''); - end; + GetSendData(Source); + IdAntiFreeze.Active := True; + try + Indy.Post(URL, Source, TextStream); + finally + IdAntiFreeze.Active := False; + end; + ResponseText := TextStream.DataString; + + ResultType := GetResultType(ResponseText); + + + if ResultType = grtOK then begin + if (GikoSys.Setting.UseSamba) and (Timer1.Enabled) then + WriteSambaTime(FHost, Now()); + + State := gdsComplete; + end else if ResultType = grtCookie then begin + //ƒ‹[ƒv–hŽ~ + if not FirstWriting then + raise Exception.Create(''); + MsgResult := MsgBox( Handle, + 'E“Še‚³‚ꂽ“à—e‚̓Rƒs[A•Û‘¶Aˆø—pA“]Ú“™‚³‚ê‚éê‡‚ª‚ ‚è‚Ü‚·B' + #13#10 + + 'E“Še‚ÉŠÖ‚µ‚Ä”­¶‚·‚éÓ”C‚Í‘S‚Ä“ŠeŽÒ‚É‹A‚µ‚Ü‚·B' + #13#10#13#10 + + '‘SÓ”C‚𕉂¤‚±‚Æ‚ð³‘ø‚µ‚ď‘‚«ž‚Ý‚Ü‚·‚©H', + 'î•ñ', + MB_YESNO or MB_ICONQUESTION); + + if MsgResult = IDYES then begin + GetCookie(Indy.Response.RawHeaders.Text, Board); + + if (Board.SPID = '') and (Board.PON = '') and (Board.Cookie = '') then + raise Exception.Create(''); + + //‚à‚¤ˆê‰ñ‚±‚̃ƒ\ƒbƒh + Send(Board.Cookie, Board.SPID, Board.PON, False); + Exit; + end else begin + CancelSend( Board, SysMenu ); + Exit; + end; + end else if ResultType = grtCheck then begin + //ƒ‹[ƒv–hŽ~ + if not FirstWriting then + raise Exception.Create(''); + + MsgResult := MsgBox( Handle, + '‘‚«ž‚Ý‚ÉŠÖ‚µ‚Ä‚Í—lX‚ȃƒOî•ñ‚ª‹L˜^‚³‚ê‚Ä‚¢‚Ü‚·B' + #13#10 + + '“Še‚ÉŠÖ‚µ‚Ä”­¶‚·‚éÓ”C‚Í‘S‚Ä“ŠeŽÒ‚É‹A‚µ‚Ü‚·B' + #13#10 + + 'Œö˜—Ç‘­‚É”½‚µ‚½‚èA‘¼l‚É–À˜f‚ð‚©‚¯‚鏑‚«ž‚݂͍T‚¦‚ĉº‚³‚¢B' + #13#10 + + '“Še‚³‚ꂽ“à—e‚̓Rƒs[E•Û‘¶Eˆø—pE“]Ú“™‚³‚ê‚éê‡‚ª‚ ‚è‚Ü‚·B' + #13#10 + + #13#10 + + '‘SÓ”C‚𕉂¤‚±‚Æ‚ð³‘ø‚µ‚ď‘‚«ž‚Ý‚Ü‚·‚©H', + 'Šm”F', + MB_YESNO or MB_ICONQUESTION); + + if MsgResult = IDYES then begin + GetCookie(Indy.Response.RawHeaders.Text, Board); + + if (Board.SPID = '') and (Board.PON = '') and (Board.Cookie = '') then + raise Exception.Create(''); + + Send(Board.Cookie, Board.SPID, Board.PON, False); + Exit; + end else begin + CancelSend( Board, SysMenu ); + Exit; + end; + end else begin + if (GikoSys.Setting.UseSamba) and (Timer1.Enabled) then + WriteSambaTime(FHost, Now()); + + State := gdsError; + raise Exception.Create(''); + end; except on E: EIdConnectException do begin State := gdsError; -- 2.11.0