diff options
author | George Hazan <george.hazan@gmail.com> | 2023-09-25 13:41:55 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-09-25 13:41:55 +0300 |
commit | c6f59d75142b7568dd89f5cff691b0b58030aafd (patch) | |
tree | 6fd83d9e6a71bbf7a750a1983922121265acadd7 /plugins/TipperYM/src | |
parent | 53669871fc860856c80c2d79cb6b21d52ea25440 (diff) |
SmileyAdd: fix for the obsolete quirks in SmaileyAdd API
Diffstat (limited to 'plugins/TipperYM/src')
-rw-r--r-- | plugins/TipperYM/src/mir_smileys.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/TipperYM/src/mir_smileys.cpp b/plugins/TipperYM/src/mir_smileys.cpp index 1d7544eeda..72c6369148 100644 --- a/plugins/TipperYM/src/mir_smileys.cpp +++ b/plugins/TipperYM/src/mir_smileys.cpp @@ -27,7 +27,6 @@ int InitTipperSmileys() // Register smiley category
if (ServiceExists(MS_SMILEYADD_REGISTERCATEGORY)) {
SMADD_REGCAT rc;
- rc.cbSize = sizeof(rc);
rc.name = "tipper";
rc.dispname = Translate("Tipper smileys");
CallService(MS_SMILEYADD_REGISTERCATEGORY, 0, (LPARAM)&rc);
@@ -322,13 +321,12 @@ SortedList *ReplaceSmileys(const wchar_t *text, int text_size, const char *proto strncpy(smileyProto, protocol, sizeof(smileyProto) - 1);
// Parse it!
- SMADD_BATCHPARSE2 sp = { 0 };
- sp.cbSize = sizeof(sp);
- sp.str = (wchar_t *)text;
- sp.flag = SAFL_TCHAR;
+ SMADD_BATCHPARSE sp = {};
+ sp.str.w = text;
+ sp.flag = SAFL_UNICODE;
sp.Protocolname = (opt.iSmileyAddFlags & SMILEYADD_USEPROTO) ? smileyProto : "tipper";
- SMADD_BATCHPARSERES *spres = (SMADD_BATCHPARSERES *)CallService(MS_SMILEYADD_BATCHPARSE, 0, (LPARAM)&sp);
+ SMADD_BATCHPARSERES *spres = (SMADD_BATCHPARSERES *)CallService(MS_SMILEYADD_BATCHPARSE, 0, (LPARAM)&sp);
if (!spres) // Did not find a smiley
return nullptr;
|