OSDN Git Service

Support synchronized session at UpdateScriptConversationNoColor
authornaru <bottle@mikage.to>
Fri, 20 Dec 2002 16:44:27 +0000 (16:44 +0000)
committernaru <bottle@mikage.to>
Fri, 20 Dec 2002 16:44:27 +0000 (16:44 +0000)
bottleclient/LogForm.pas

index b8d8b25..681baa4 100755 (executable)
@@ -362,7 +362,7 @@ end;
 procedure TfrmLog.UpdateScriptConversationNoColor(const Script: String);
 var Scr: String;
     i: integer;
-    UnyuTalking, Talked, LastUnyuTalked: boolean;
+    UnyuTalking, Talked, LastUnyuTalked, InSynchronize, LastInSynchronize: boolean;
 begin
   Scr := Script;
   frmSender.DoTrans(Scr, [toConvertURL]);
@@ -376,23 +376,25 @@ begin
   Talked := false;
   UnyuTalking := false;
   LastUnyuTalked := false;
+  InSynchronize := false;
+  LastInSynchronize := false;
   for i := 0 to SsParser.Count-1 do begin
-    if (SsParser[i] = '\u') and not UnyuTalking then begin
-      UnyuTalking := true;
-    end;
-    if (SsParser[i] = '\h') and UnyuTalking then begin
-      UnyuTalking := false;
-    end;
+    if SsParser[i] = '\u' then UnyuTalking := true;
+    if SsParser[i] = '\h' then UnyuTalking := false;
+    if SsParser[i] = '\_s' then InSynchronize := not InSynchronize;
     if SsParser.MarkUpType[i] in [mtStr, mtMeta] then begin
-      if not Talked then begin
-        if UnyuTalking then Scr := '\82¤:' else Scr := '\82³:';
+      if not Talked then begin // \83X\83N\83\8a\83v\83g\8dÅ\8f\89\82Ì\83Z\83\8a\83t
+        if InSynchronize then Scr := '\97¼\81F'
+        else if UnyuTalking then Scr := '\82¤:' else Scr := '\82³:';
       end;
-      if Talked and (UnyuTalking <> LastUnyuTalked) then begin
+      if Talked and ((UnyuTalking <> LastUnyuTalked) or (InSynchronize <> LastInSynchronize)) then begin
         Scr := Scr + #13#10;
-        if UnyuTalking then Scr := Scr + '\82¤:' else Scr := Scr + '\82³:';
+        if InSynchronize then Scr := Scr + '\97¼\81F'
+        else if UnyuTalking then Scr := Scr + '\82¤:' else Scr := Scr + '\82³:';
       end;
       Scr := Scr + SsParser[i];
       Talked := true;
+      LastInSynchronize := InSynchronize;
       LastUnyuTalked := UnyuTalking;
     end;
   end;