probiers mal so:
Delphi-Quellcode:
procedure TForm1.ICQClient2ServerListRecv(Sender: TObject;
SrvContactList: TList);
var
i: Word;
UserInfo: TUINEntry;
begin
if SrvContactList.Count > 0 then
for i := 0 to SrvContactList.Count - 1 do
begin
UserInfo := PUINEntry(SrvContactList.Items[i])^;
if UserInfo.CType = U_VISIBLE_LIST then
ICQC.VisibleList.Add(IntToStr(UserInfo.UIN))
else if UserInfo.CType = U_INVISIBLE_LIST then
ICQC.InvisibleList.Add(IntToStr(UserInfo.UIN))
else if UserInfo.CType = U_NORMAL then
begin
if ICQClient2.AddContact(UserInfo.UIN) then
begin
ComboBox2.Items.Add(userinfo.Nick+' '+inttostr(userinfo.UIN));
end;
end;
end;
ICQClient2.DestroyUINList(SrvContactList);
end;
und
Delphi-Quellcode:
...
if Length(IntToStr(UserInfo.UIN))= 9 then
...
is auch nicht so gut, es gibt noch kürzere Nummern