diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-21 16:11:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-21 16:11:58 +0000 |
commit | 48266e479d1fcf5153b29c612866845990fccad8 (patch) | |
tree | c8cbc908cd3c5f08731e5e8d7eaac6b568007d09 /protocols/IRCG/src/ircproto.cpp | |
parent | ebdb556f152734035846f120eb8112f88ef91281 (diff) |
war against atavisms continues
- everything that goes to PSS_MESSAGE should be sent as utf8 string;
- thus PREF_UNICODE & PREF_UTF support discontinued, these constants are removed;
- support for PREF_UNICODE & PREF_UTF in protocols also removed;
- PREF_UNICODE used in file transfers (PROTOFILERECVT) replaced with PRFF_UNICODE / PRFF_TCHAR
git-svn-id: http://svn.miranda-ng.org/main/trunk@13734 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG/src/ircproto.cpp')
-rw-r--r-- | protocols/IRCG/src/ircproto.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index c70e78ab11..162876aeca 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -460,7 +460,7 @@ DWORD_PTR __cdecl CIrcProto::GetCaps(int type, MCONTACT) return PF2_SHORTAWAY;
case PFLAGNUM_4:
- return PF4_NOAUTHDENYREASON | PF4_NOCUSTOMAUTH | PF4_IMSENDUTF;
+ return PF4_NOAUTHDENYREASON | PF4_NOCUSTOMAUTH;
case PFLAG_UNIQUEIDTEXT:
return (DWORD_PTR)Translate("Nickname");
@@ -678,7 +678,7 @@ void __cdecl CIrcProto::AckMessageSuccess(void *info) delete param;
}
-int __cdecl CIrcProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc)
+int __cdecl CIrcProto::SendMsg(MCONTACT hContact, int, const char* pszSrc)
{
BYTE bDcc = getByte(hContact, "DCC", 0);
WORD wStatus = getWord(hContact, "Status", ID_STATUS_OFFLINE);
@@ -686,6 +686,7 @@ int __cdecl CIrcProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc) ForkThread(&CIrcProto::AckMessageFailDcc, (void*)hContact);
return 0;
}
+
if (!bDcc && (m_iStatus == ID_STATUS_OFFLINE || m_iStatus == ID_STATUS_CONNECTING)) {
ForkThread(&CIrcProto::AckMessageFail, (void*)hContact);
return 0;
@@ -694,20 +695,7 @@ int __cdecl CIrcProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc) int codepage = getCodepage();
TCHAR *result;
- if (flags & PREF_UNICODE) {
- const char* p = strchr(pszSrc, '\0');
- if (p != pszSrc) {
- while (*(++p) == '\0')
- ;
- result = mir_u2t_cp((wchar_t*)p, codepage);
- }
- else result = mir_a2t_cp(pszSrc, codepage);
- }
- else if (flags & PREF_UTF)
- mir_utf8decode(NEWSTR_ALLOCA(pszSrc), &result);
- else
- result = mir_a2t_cp(pszSrc, codepage);
-
+ mir_utf8decode(NEWSTR_ALLOCA(pszSrc), &result);
PostIrcMessageWnd(NULL, hContact, result);
mir_free(result);
|