diff options
Diffstat (limited to 'protocols/Yahoo/src')
-rw-r--r-- | protocols/Yahoo/src/file_transfer.cpp | 11 | ||||
-rw-r--r-- | protocols/Yahoo/src/im.cpp | 16 | ||||
-rw-r--r-- | protocols/Yahoo/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Yahoo/src/yahoo.cpp | 4 |
4 files changed, 8 insertions, 25 deletions
diff --git a/protocols/Yahoo/src/file_transfer.cpp b/protocols/Yahoo/src/file_transfer.cpp index b5d4f56839..21faa232d1 100644 --- a/protocols/Yahoo/src/file_transfer.cpp +++ b/protocols/Yahoo/src/file_transfer.cpp @@ -503,7 +503,7 @@ void CYahooProto::ext_got_file(const char *me, const char *who, const char *url, TCHAR* ptszFileName = mir_a2t(fn);
PROTORECVFILET pre = {0};
- pre.flags = PREF_TCHAR;
+ pre.dwFlags = PRFF_TCHAR;
pre.fileCount = 1;
pre.timestamp = time(NULL);
pre.tszDescription = mir_a2t(msg);
@@ -547,18 +547,13 @@ void CYahooProto::ext_got_files(const char *me, const char *who, const char *ft_ }
- TCHAR* ptszFileName = mir_a2t(fn);
-
PROTORECVFILET pre = {0};
- pre.flags = PREF_TCHAR;
pre.fileCount = 1;
pre.timestamp = time(NULL);
- pre.tszDescription = _T("");
- pre.ptszFiles = &ptszFileName;
+ pre.szDescription = "";
+ pre.pszFiles = (char**)&fn;
pre.lParam = (LPARAM)ft;
ProtoChainRecvFile(ft->hContact, &pre);
-
- mir_free(ptszFileName);
}
void CYahooProto::ext_got_file7info(const char *me, const char *who, const char *url, const char *fname, const char *ft_token)
diff --git a/protocols/Yahoo/src/im.cpp b/protocols/Yahoo/src/im.cpp index 0da62a376a..1301007189 100644 --- a/protocols/Yahoo/src/im.cpp +++ b/protocols/Yahoo/src/im.cpp @@ -105,8 +105,6 @@ void CYahooProto::ext_got_im(const char *me, const char *who, int protocol, cons Set_Protocol(hContact, protocol);
PROTORECVEVENT pre = { 0 };
- pre.flags = (utf8) ? PREF_UTF : 0;
-
if (tm) {
MEVENT hEvent = db_event_last(hContact);
@@ -171,29 +169,21 @@ void __cdecl CYahooProto::im_sendackfail_longmsg(void *hContact) (LPARAM)Translate("Message is too long: Yahoo messages are limited by 800 UTF8 chars"));
}
-int __cdecl CYahooProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc)
+int __cdecl CYahooProto::SendMsg(MCONTACT hContact, int, const char* pszSrc)
{
if (!m_bLoggedIn) {/* don't send message if we not connected! */
ForkThread(&CYahooProto::im_sendackfail, (void*)hContact);
return 1;
}
- ptrA msg;
- if (flags & PREF_UNICODE) /* convert to utf8 */
- msg = mir_utf8encodeW((wchar_t*)&pszSrc[mir_strlen(pszSrc) + 1]);
- else if (flags & PREF_UTF)
- msg = mir_strdup(pszSrc);
- else
- msg = mir_utf8encode(pszSrc);
-
- if (mir_strlen(msg) > 800) {
+ if (mir_strlen(pszSrc) > 800) {
ForkThread(&CYahooProto::im_sendackfail_longmsg, (void*)hContact);
return 1;
}
DBVARIANT dbv;
if (!getString(hContact, YAHOO_LOGINID, &dbv)) {
- send_msg(dbv.pszVal, getWord(hContact, "yprotoid", 0), msg, 1);
+ send_msg(dbv.pszVal, getWord(hContact, "yprotoid", 0), pszSrc, 1);
ForkThread(&CYahooProto::im_sendacksuccess, (void*)hContact);
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index af005ccd85..6183eda35d 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -308,7 +308,7 @@ DWORD_PTR __cdecl CYahooProto::GetCaps(int type, MCONTACT hContact) case PFLAGNUM_4:
return PF4_FORCEAUTH | PF4_FORCEADDED | PF4_SUPPORTTYPING | PF4_SUPPORTIDLE
- |PF4_AVATARS | PF4_OFFLINEFILES | PF4_IMSENDUTF | PF4_IMSENDOFFLINE /* for Meta plugin*/;
+ |PF4_AVATARS | PF4_OFFLINEFILES | PF4_IMSENDOFFLINE /* for Meta plugin*/;
case PFLAG_UNIQUEIDTEXT:
return (DWORD_PTR) Translate("ID");
case PFLAG_UNIQUEIDSETTING:
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp index a6690a2010..b0fb7b6aa5 100644 --- a/protocols/Yahoo/src/yahoo.cpp +++ b/protocols/Yahoo/src/yahoo.cpp @@ -782,9 +782,7 @@ void CYahooProto::ext_contact_added(const char *myid, const char *who, const cha //setWord(hContact, "yprotoid", protocol);
Set_Protocol(hContact, protocol);
- pre.flags = PREF_UTF;
- pre.timestamp = time(NULL);
-
+ pre.timestamp = time(NULL);
pre.lParam = sizeof(DWORD)+sizeof(HANDLE)+mir_strlen(who)+mir_strlen(nick)+5;
if (fname != NULL)
|