Browse Source

...

oldchat
Mikanoshi 5 years ago
parent
commit
03d730c41b
2 changed files with 23 additions and 16 deletions
  1. +18
    -11
      RnQ/ICQ/ICQv9.pas
  2. +5
    -5
      RnQ/utilLib.pas

+ 18
- 11
RnQ/ICQ/ICQv9.pas View File

@ -650,7 +650,7 @@ type
procedure sendContacts(cnt : TRnQContact;flags:dword; cl:TRnQCList);
procedure sendQueryInfo(uin: Integer);
procedure sendSimpleQueryInfo(const uin: TUID);
procedure sendAdvQueryInfo(const uin: TUID; token: RawByteString);
procedure sendAdvQueryInfo(const uin: TUID; const token: RawByteString);
procedure sendFullQueryInfo(const uin: TUID);
procedure sendNewQueryInfo(const uin: TUID);
procedure sendAddedYou(const uin: TUID);
@ -4171,27 +4171,27 @@ begin
end; // sendQueryInfo}
procedure TicqSession.sendWPsearch(wp:TwpSearch; idx : Integer);
function TLVIfNotNull(t : word; s : RawByteString) : RawByteString;
function TLVIfNotNull(t : word; s : RawByteString) : RawByteString; inline;
begin
if s > '' then
result := TLV_LE(t, WNTS(s));
end;
function TLVIfbNotNull(t : word; b : byte) : RawByteString;
function TLVIfbNotNull(t : word; b : byte) : RawByteString; inline;
begin
if b > 0 then
result := TLV_LE(t, AnsiChar(b));
end;
function TLVIfWNotNull(t : word; w : word) : RawByteString;
function TLVIfWNotNull(t : word; w : word) : RawByteString; inline;
begin
if w > 0 then
result := TLV_LE(t, word_LEasStr(w));
end;
function TLVIfDWNotNull(t : word; d : dword) : RawByteString;
function TLVIfDWNotNull(t : word; d : dword) : RawByteString; inline;
begin
if d > 0 then
result := TLV_LE(t, dword_BEasStr(d));
end;
function TLVIfINotNull(t : word; w : word; s : RawByteString) : RawByteString;
function TLVIfINotNull(t : word; w : word; s : RawByteString) : RawByteString; inline;
begin
if (w > 0) or (s > '') then
result := TLV_LE(t, word_LEasStr(w) + WNTS(s));
@ -4296,8 +4296,11 @@ begin
wasUINwp := false;
if (not IsWP) and (wp.uin > '') then
s:= TLV($05B9, Word($8000)) + #$00#$00#$00#$00 + Length_BE(#00#01#00#02#00#02) +
#$00#$00#$04#$E3#$00#$00 + #$00#$02#$00#$03#$00#$00
s := SNAC_ver($05B9, 02, $8000, 0, 02)
+ word_BEasStr($00)
+ word_BEasStr(GetACP)
+ dword_BEasStr($02)
+ TLV(03, '')
// + TLV(02, Word(idx))
+ TLV(01,
TLVIfSNotNull(META_COMPAD_UID, wp.uin)+
@ -4305,7 +4308,10 @@ begin
)
else
begin
s := #$05#$B9#$0F#$A0#$00#$00#$00#$00#$00#$00#$00#$00#$04#$E3#$00#$00
s := #$05#$B9#$0F#$A0#$00#$00#$00#$00#$00#$00
+ word_BEasStr($00)
+ word_BEasStr($FDE9) // UTF8
+ word_BEasStr($00)
+ TLV(02, Word(idx))
+ TLV(01,
// + TLVIfNotNull(User_First, wp.first)
@ -4340,7 +4346,7 @@ begin
addRef(REF_wp, '');
end; // sendWPsearch2
procedure TicqSession.sendAdvQueryInfo(const uin: TUID; token: RawByteString);
procedure TicqSession.sendAdvQueryInfo(const uin: TUID; const token: RawByteString);
function TLVIfSNotNull(t: word; const s: RawByteString): RawByteString;
begin
if (s > '') then
@ -4413,7 +4419,8 @@ procedure TicqSession.sendSMS2(dest, msg: String; ack: Boolean);
var
req: RawByteString;
begin
if not isReady then Exit;
if not isReady then
Exit;
msg := '<HTML><BODY dir="ltr"><FONT face="Arial" color="#000000" size="2">' + msg + '</FONT></BODY></HTML>';
msg := StrToUnicode(msg);


+ 5
- 5
RnQ/utilLib.pas View File

@ -124,7 +124,7 @@ procedure sortCL(cl: TRnQCList);
procedure sortCLbyGroups(cl: TRnQCList);
procedure updateViewInfo(c: TRnQContact);
{$IFDEF RNQ_FULL2}
procedure convertHistoriesDlg(oldPwd, newPwd: string);
procedure convertHistoriesDlg(const oldPwd, newPwd: string);
{$ENDIF}
procedure openSendContacts(dest: TRnQContact);
function isEmailAddress(const s: string; start: integer): integer;
@ -179,7 +179,7 @@ procedure wallpaperize(DC: THandle; r: Trect); inline; overload;
// file management
function delSUBtree(subPath: string): Boolean;
function deltree(path: string): Boolean;
function deleteFromTo(fn: string; from, to_: integer): Boolean;
function deleteFromTo(const fn: string; from, to_: integer): Boolean;
function saveAllLists(const uPath: String; const pr: TRnQProtocol; pProxys: Tarrproxy): Boolean;
function loadDB(zp: TZipFile; pCheckGroups: Boolean): Boolean;
// procedure saveDB;
@ -203,7 +203,7 @@ function str2sortby(const s: AnsiString): TsortBy;
procedure CheckBDays;
function GetWidth(chk: TCheckBox): integer;
function StringFromFile(const FileName: TFileName): RawByteString;
procedure parseMsgImages(imgStr: RawByteString; var imgList: TStringList);
procedure parseMsgImages(const imgStr: RawByteString; var imgList: TStringList);
function loadImageEx(var img: TImageEx; var RnQPicStream: TMemoryStream; fitScreen: Boolean = False): String;
@ -1514,7 +1514,7 @@ begin
end;
end;
procedure parseMsgImages(imgStr: RawByteString; var imgList: TStringList);
procedure parseMsgImages(const imgStr: RawByteString; var imgList: TStringList);
var
pos1, pos2: integer;
image: RawByteString;
@ -2380,7 +2380,7 @@ begin
exec('mailto:' + email);
end;
function deleteFromTo(fn: string; from, to_: integer): Boolean;
function deleteFromTo(const fn: string; from, to_: integer): Boolean;
begin
result := partDeleteFile(fn, from, to_ - from)
end;


Loading…
Cancel
Save