anchor.diff:    FServerMessage := '';
   end;
   
  +procedure TIRC.SendNotice(const Msg: string);
  +begin
  +  FServerMessage := Msg;
  +  TIdSync.SynchronizeMethod(@SendServerMessage);
  +end;
  +
   procedure TIRC.SendUserJoined;
   begin
     FOnUserJoined(FChannel, FNickname);
  +end;
  +
  +procedure TIRC.DoConnect;
  +begin
  +  try
  +     FIdIRC.Connect();
  +  except
  +    try
  +      FIdIRC.Disconnect(False);
  +    except
  +    end;
  +    if FIdIRC.IOHandler <> nil then
  +       FIdIRC.IOHandler.InputBuffer.Clear;
  +
  +    MessageBox('Lost connection to server.');
  +  end;
  +end;
  +
  +procedure TIRC.MessageBox(const Msg: string);
  +begin
  +  if Assigned(FOnShowPopup) then
  +     FOnShowPopup(Msg);
   end;
   
   procedure TIRC.Connect;
   begin
     if FIdIRC.Connected then
     begin
  -    if Assigned(FOnShowPopup) then
  -       FOnShowPopup(Format(StrAlreadyConnected, [FIdIRC.Host]));
  +    MessageBox(Format(StrAlreadyConnected, [FIdIRC.Host]));
       Exit;
     end;
  +
     ReadConfig;
  -  FIdIRC.Connect;
  +  DoConnect;
     ConfigureEncoding;
   end;
   
  
positive.code:   if not FIdIRC.Connected then
      Exit;
  
    FIdIRC.IOHandler.InputBuffer.Clear;
    FIdIRC.Disconnect;
  end;
  
  procedure TIRC.JoinChannel(const Name: string);
  
negative.code:       procedure SendParted;
        procedure SendQuit;
        procedure SendServerMessage;
        procedure SendNotice(const Msg: string); overload;
        procedure SendUserJoined;
        procedure DoConnect;
        procedure MessageBox(const Msg: string);
      public
        property Log: TStrings read FLog write FLog;
        property Ready: Boolean read FReady;
  