OSDN Git Service

Fix that invalid script could be locally confirmed
authornaru <bottle@mikage.to>
Sat, 20 Sep 2003 07:48:26 +0000 (07:48 +0000)
committernaru <bottle@mikage.to>
Sat, 20 Sep 2003 07:48:26 +0000 (07:48 +0000)
Send confirmation dialog will be displayed after script validation

bottleclient/MainForm.pas

index 8c07fc5..31935b1 100755 (executable)
@@ -490,7 +490,7 @@ begin
   if Length(AScript) = 0 then Exit;
   YenETrans;
   AScript := ScriptTransForSSTP(AScript, Err);
-  if AScript = '' then
+  if Err <> '' then
   begin
     ShowMessage(Err);
     Exit;
@@ -709,6 +709,14 @@ begin
     Exit;
   end;
 
+  YenETrans;
+  Talk := GetScriptText;
+  Err := DoTrans(Talk, [toWarnMessySurface, toWarnCheck]);
+  if Err <> '' then begin
+    MessageDlg(Err, mtWarning, [mbOk], 0);
+    Exit;
+  end;
+
   if Pref.NeedConfirmBeforeSend and FScriptModified then begin
     MessageDlg('\91\97\90M\91O\82É\83\8d\81[\83J\83\8b\8am\94F\82µ\82Ä\82­\82¾\82³\82¢\81B', mtError, [mbOk], 0);
     Exit;
@@ -718,13 +726,6 @@ begin
     if not SendConfirmDialog(FNowChannel, cbxTargetGhost.Text) then Exit;
   end;
 
-  YenETrans;
-  Talk := GetScriptText;
-  Err := DoTrans(Talk, [toWarnMessySurface, toWarnCheck]);
-  if Err <> '' then begin
-    MessageDlg(Err, mtWarning, [mbOk], 0);
-    Exit;
-  end;
   Command := nil;
   Ghost := '';
   if cbxTargetGhost.ItemIndex > 0 then Ghost := cbxTargetGhost.Text;