summaryrefslogtreecommitdiff
path: root/plugins/MirOTR
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/MirOTR
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff)
hello, Unix.
phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR')
-rw-r--r--plugins/MirOTR/src/dialogs.cpp32
-rw-r--r--plugins/MirOTR/src/dllmain.cpp4
-rw-r--r--plugins/MirOTR/src/mirotrmenu.cpp10
-rw-r--r--plugins/MirOTR/src/options.cpp16
-rw-r--r--plugins/MirOTR/src/otr.cpp26
-rw-r--r--plugins/MirOTR/src/stdafx.h6
-rw-r--r--plugins/MirOTR/src/svcs_proto.cpp4
-rw-r--r--plugins/MirOTR/src/utils.cpp18
8 files changed, 57 insertions, 59 deletions
diff --git a/plugins/MirOTR/src/dialogs.cpp b/plugins/MirOTR/src/dialogs.cpp
index 6f3e24a5ba..0451367f84 100644
--- a/plugins/MirOTR/src/dialogs.cpp
+++ b/plugins/MirOTR/src/dialogs.cpp
@@ -119,7 +119,7 @@ static INT_PTR CALLBACK DlgSMPUpdateProc(HWND hwndDlg, UINT msg, WPARAM wParam,
}
break;
default:
- SetDlgItemText(hwndDlg, IDC_STC_SMP_PROGRESS, _T(""));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_PROGRESS, L"");
}
}
break;
@@ -199,7 +199,7 @@ static INT_PTR CALLBACK DlgSMPResponseProc(HWND hwndDlg, UINT msg, WPARAM wParam
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, TRUE, 0);
SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateT(LANG_SMP_QUESTION));
- SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, _T(""));
+ SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0);
SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_ANSWER));
@@ -215,11 +215,11 @@ static INT_PTR CALLBACK DlgSMPResponseProc(HWND hwndDlg, UINT msg, WPARAM wParam
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
- SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, TRUE, 0);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, L"");
- SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, _T(""));
+ SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0);
SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_PASSWORD));
@@ -386,11 +386,11 @@ static INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
- SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, FALSE, 0);
SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateT(LANG_SMP_QUESTION));
- SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, _T(""));
+ SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0);
SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_ANSWER));
@@ -495,11 +495,11 @@ static INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
- SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, FALSE, 0);
SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateT(LANG_SMP_QUESTION));
- SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, _T(""));
+ SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0);
SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_ANSWER));
@@ -516,11 +516,11 @@ static INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
- SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, TRUE, 0);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, L"");
- SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, _T(""));
+ SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0);
SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_PASSWORD));
@@ -591,14 +591,14 @@ void SMPDialogUpdate(ConnContext *context, int percent)
switch (percent){
case 0:
VerifyFingerprint(context, false);
- ShowWarning(_T("SMP failed"));
+ ShowWarning(L"SMP failed");
break;
case 100:
VerifyFingerprint(context, true);
- ShowWarning(_T("SMP successful"));
+ ShowWarning(L"SMP successful");
break;
default:
- ShowWarning(_T("Received an SMP update"));
+ ShowWarning(L"Received an SMP update");
}
*/
}
@@ -611,7 +611,7 @@ void SMPDialogReply(ConnContext *context, const char* question)
data->question = (question) ? mir_utf8decodeT(question) : NULL;
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SMP_INPUT), 0, DlgSMPResponseProc, (LPARAM)data);
/*
- ShowError(_T("SMP requires user password (NOT IMPL YET)"));
+ ShowError(L"SMP requires user password (NOT IMPL YET)");
otr_abort_smp(context);
*/
//otr_continue_smp(context, pass, mir_strlen(pass));
diff --git a/plugins/MirOTR/src/dllmain.cpp b/plugins/MirOTR/src/dllmain.cpp
index 218f53e94a..134c5d8114 100644
--- a/plugins/MirOTR/src/dllmain.cpp
+++ b/plugins/MirOTR/src/dllmain.cpp
@@ -58,7 +58,7 @@ int ModulesLoaded(WPARAM, LPARAM)
extern "C" __declspec(dllexport) int Load(void)
{
- DEBUGOUT_T("LOAD MIROTR");
+ DEBUGOUTA("LOAD MIROTR");
mir_getLP(&pluginInfo);
mir_getCLI();
@@ -104,7 +104,7 @@ extern "C" __declspec(dllexport) int Unload(void)
UnhookEvent(hEventWindow);
//UnhookEvent(hEventDbEventAddedFilter);
//UnhookEvent(hEventDbEventAdded);
- DEBUGOUT_T("UNLOAD MIROTR");
+ DEBUGOUTA("UNLOAD MIROTR");
DeinitSRMM();
DeinitDBFilter();
diff --git a/plugins/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/src/mirotrmenu.cpp
index 407f1cbf63..e4c214f823 100644
--- a/plugins/MirOTR/src/mirotrmenu.cpp
+++ b/plugins/MirOTR/src/mirotrmenu.cpp
@@ -68,12 +68,12 @@ INT_PTR MirOTRMenuCheckService(WPARAM wParam, LPARAM)
switch (level) {
case TRUST_PRIVATE:
- mir_sntprintf(text, _T("%s [v%i]"), TranslateT(LANG_STATUS_PRIVATE), context->protocol_version);
+ mir_sntprintf(text, L"%s [v%i]", TranslateT(LANG_STATUS_PRIVATE), context->protocol_version);
Menu_ModifyItem(hStatusInfoItem, text, IcoLib_GetIconHandle(ICON_PRIVATE));
break;
case TRUST_UNVERIFIED:
- mir_sntprintf(text, _T("%s [v%i]"), TranslateT(LANG_STATUS_UNVERIFIED), context->protocol_version);
+ mir_sntprintf(text, L"%s [v%i]", TranslateT(LANG_STATUS_UNVERIFIED), context->protocol_version);
Menu_ModifyItem(hStatusInfoItem, text, IcoLib_GetIconHandle(ICON_UNVERIFIED));
break;
@@ -150,9 +150,9 @@ void InitMirOTRMenu(void)
WNDCLASS wc = { 0 };
wc.hInstance = hInst;
wc.lpfnWndProc = PopupMenuWndProc;
- wc.lpszClassName = _T("MirOTRPopupMenuProcessor");
+ wc.lpszClassName = L"MirOTRPopupMenuProcessor";
RegisterClass(&wc);
- hDummyPaintWin = CreateWindowEx(0, _T("MirOTRPopupMenuProcessor"), NULL, 0, 0, 0, 1, 1, 0, 0, hInst, 0);
+ hDummyPaintWin = CreateWindowEx(0, L"MirOTRPopupMenuProcessor", NULL, 0, 0, 0, 1, 1, 0, 0, hInst, 0);
CreateServiceFunction("MirOTRMenuExecService", MirOTRMenuExecService);
CreateServiceFunction("MirOTRMenuCheckService", MirOTRMenuCheckService);
@@ -208,7 +208,7 @@ void UninitMirOTRMenu(void)
DestroyWindow(hDummyPaintWin);
hDummyPaintWin = 0;
- UnregisterClass(_T("MirOTRPopupMenuProcessor"), hInst);
+ UnregisterClass(L"MirOTRPopupMenuProcessor", hInst);
Menu_RemoveObject(hMirOTRMenuObject);
hMirOTRMenuObject = 0;
diff --git a/plugins/MirOTR/src/options.cpp b/plugins/MirOTR/src/options.cpp
index a5259ae98e..6743a71079 100644
--- a/plugins/MirOTR/src/options.cpp
+++ b/plugins/MirOTR/src/options.cpp
@@ -8,7 +8,7 @@ TCHAR g_fingerprint_store_filename[MAX_PATH];
TCHAR g_instag_filename[MAX_PATH];
HANDLE hPATH_MIROTR;
Options options;
-#define DATA_DIRECTORY MIRANDA_USERDATAT _T("\\") _T(MODULENAME)
+#define DATA_DIRECTORY MIRANDA_USERDATAT L"\\" _T(MODULENAME)
struct PROTOREGENKEYOPTIONS {
HWND refresh;
@@ -21,15 +21,15 @@ void SetFilenames(const TCHAR *path)
return;
CreateDirectoryTreeT(path);
- mir_sntprintf(g_private_key_filename, _T("%s\\") _T(PRIVATE_KEY_FILENAME), path);
- mir_sntprintf(g_fingerprint_store_filename, _T("%s\\") _T(FINGERPRINT_STORE_FILENAME), path);
- mir_sntprintf(g_instag_filename, _T("%s\\") _T(INSTAG_FILENAME), path);
+ mir_sntprintf(g_private_key_filename, L"%s\\" _T(PRIVATE_KEY_FILENAME), path);
+ mir_sntprintf(g_fingerprint_store_filename, L"%s\\" _T(FINGERPRINT_STORE_FILENAME), path);
+ mir_sntprintf(g_instag_filename, L"%s\\" _T(INSTAG_FILENAME), path);
}
int FoldersChanged(WPARAM, LPARAM)
{
TCHAR path[MAX_PATH];
- if ( FoldersGetCustomPathT(hPATH_MIROTR, path, _countof(path), _T("")))
+ if ( FoldersGetCustomPathT(hPATH_MIROTR, path, _countof(path), L""))
SetFilenames( VARST(DATA_DIRECTORY));
else
SetFilenames(path);
@@ -120,7 +120,7 @@ extern "C" void set_context_contact(void *, ConnContext *context)
void ReadPrivkeyFiles()
{
- DEBUGOUT_T("READ privkey");
+ DEBUGOUTA("READ privkey");
lib_cs_lock();
otrl_privkey_read(otr_user_state, _T2A(g_private_key_filename));
otrl_privkey_read_fingerprints(otr_user_state, _T2A(g_fingerprint_store_filename), set_context_contact, 0);
@@ -370,7 +370,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsProto(HWND hwndDlg, UINT msg, WPARAM wP
if (key) {
otrl_privkey_forget(key);
otrl_privkey_write(otr_user_state, _T2A(g_private_key_filename));
- ListView_SetItemText(GetDlgItem(hwndDlg, IDC_LV_PROTO_PROTOS), sel, 2, _T(""));
+ ListView_SetItemText(GetDlgItem(hwndDlg, IDC_LV_PROTO_PROTOS), sel, 2, L"");
}
}
}
@@ -821,7 +821,7 @@ static int OpenOptions(WPARAM wParam, LPARAM)
odp.position = 100;
odp.hInstance = hInst;
odp.ptszGroup = LPGENT("Services");
- odp.ptszTitle = _T("OTR");
+ odp.ptszTitle = L"OTR";
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.ptszTab = LANG_OPT_GENERAL;
diff --git a/plugins/MirOTR/src/otr.cpp b/plugins/MirOTR/src/otr.cpp
index 8125247cd2..8f2c9f0bb8 100644
--- a/plugins/MirOTR/src/otr.cpp
+++ b/plugins/MirOTR/src/otr.cpp
@@ -79,7 +79,7 @@ INT_PTR CALLBACK GenKeyDlgBoxProc(HWND hWndDlg, UINT msg, WPARAM, LPARAM lParam)
extern "C" {
/* Return the OTR policy for the given context. */
OtrlPolicy otr_gui_policy(void *opdata, ConnContext *context) {
- DEBUGOUT_T("OTR_GUI_POLICY\n");
+ DEBUGOUTA("OTR_GUI_POLICY\n");
MCONTACT hContact = (UINT_PTR)opdata;
DWORD pol;
if (hContact) {
@@ -103,7 +103,7 @@ extern "C" {
* desired. */
// otr_gui_create_privkey(void *opdata, const char *account_name, const char *protocol) {
void otr_gui_create_privkey(void *opdata, const char *, const char *protocol) {
- DEBUGOUT_T("OTR_GUI_CREATE_PRIVKEY\n");
+ DEBUGOUTA("OTR_GUI_CREATE_PRIVKEY\n");
if (opdata) {
protocol = GetContactProto((UINT_PTR)opdata);
}
@@ -120,7 +120,7 @@ extern "C" {
* logged in" errors if you're wrong. */
//int otr_gui_is_logged_in(void *opdata, const char *accountname, const char *protocol, const char *recipient) {
int otr_gui_is_logged_in(void *opdata, const char *, const char *, const char *) {
- DEBUGOUT_T("OTR_GUI_IS_LOGGED_IN\n");
+ DEBUGOUTA("OTR_GUI_IS_LOGGED_IN\n");
MCONTACT hContact = (UINT_PTR)opdata;
if (hContact) {
WORD status = db_get_w(hContact, GetContactProto(hContact), "Status", ID_STATUS_OFFLINE);
@@ -135,7 +135,7 @@ extern "C" {
* accountname/protocol. */
//void otr_gui_inject_message(void *opdata, const char *accountname, const char *protocol, const char *recipient, const char *message) {
void otr_gui_inject_message(void *opdata, const char *, const char *protocol, const char *, const char *message) {
- DEBUGOUT_T("OTR_GUI_INJECT_MESSAGE\n");
+ DEBUGOUTA("OTR_GUI_INJECT_MESSAGE\n");
MCONTACT hContact = (UINT_PTR)opdata;
if (db_get_w(hContact, protocol, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
ProtoChainSend(hContact, PSS_MESSAGE, PREF_BYPASS_OTR, (LPARAM)message);
@@ -146,12 +146,12 @@ extern "C" {
//void otr_gui_update_context_list(void *opdata) {
void otr_gui_update_context_list(void *) {
//MessageBox(0, "Update Context List", "OTR Callback", MB_OK);
- DEBUGOUT_T("OTR: Update Context List\n");
+ DEBUGOUTA("OTR: Update Context List\n");
}
/* A new fingerprint for the given user has been received. */
void otr_gui_new_fingerprint(void *opdata, OtrlUserState us, const char *accountname, const char *protocol, const char *username, unsigned char fingerprint[20]) {
- DEBUGOUT_T("OTR_GUI_NEW_FINGERPRINT\n");
+ DEBUGOUTA("OTR_GUI_NEW_FINGERPRINT\n");
ConnContext *context = otrl_context_find(us, username, accountname, protocol, OTRL_INSTAG_BEST, TRUE, 0, add_appdata, opdata);
Fingerprint *fp = otrl_context_find_fingerprint(context, fingerprint, TRUE, 0);
@@ -164,14 +164,14 @@ extern "C" {
/* The list of known fingerprints has changed. Write them to disk. */
//void otr_gui_write_fingerprints(void *opdata) {
void otr_gui_write_fingerprints(void *) {
- DEBUGOUT_T("OTR_GUI_WRITE_FINGERPRINTS\n");
+ DEBUGOUTA("OTR_GUI_WRITE_FINGERPRINTS\n");
//if(MessageBox(0, Translate("Would you like to save the current fingerprint list?"), Translate(MODULE), MB_YESNO) == IDYES)
otrl_privkey_write_fingerprints(otr_user_state, _T2A(g_fingerprint_store_filename));
}
/* A ConnContext has entered a secure state. */
void otr_gui_gone_secure(void *opdata, ConnContext *context) {
- DEBUGOUT_T("OTR_GUI_GONE_SECURE\n");
+ DEBUGOUTA("OTR_GUI_GONE_SECURE\n");
MCONTACT hContact = (UINT_PTR)opdata;
TrustLevel trusted = otr_context_get_trust(context);
SetEncryptionStatus(hContact, trusted);
@@ -199,7 +199,7 @@ extern "C" {
/* A ConnContext has left a secure state. */
void otr_gui_gone_insecure(void *opdata, ConnContext *context) {
MCONTACT hContact = (UINT_PTR)opdata;
- DEBUGOUT_T("OTR_GUI_GONE_INSECURE\n");
+ DEBUGOUTA("OTR_GUI_GONE_INSECURE\n");
TCHAR buff[512];
mir_sntprintf(buff, TranslateT(LANG_SESSION_TERMINATED_BY_OTR), contact_get_nameT(hContact));
//MessageBox(0, buff, Translate("OTR Information"), MB_OK);
@@ -215,7 +215,7 @@ extern "C" {
* already knew. is_reply indicates whether we initiated the AKE. */
void otr_gui_still_secure(void *opdata, ConnContext *context, int is_reply) {
MCONTACT hContact = (UINT_PTR)opdata;
- DEBUGOUT_T("OTR_GUI_STILL_SECURE\n");
+ DEBUGOUTA("OTR_GUI_STILL_SECURE\n");
TrustLevel trusted = otr_context_get_trust(context);
SetEncryptionStatus(hContact, trusted);
TCHAR buff[1024];
@@ -285,7 +285,7 @@ extern "C" {
}
void handle_smp_event(void *opdata, OtrlSMPEvent smp_event, ConnContext *context, unsigned short progress_percent, char *question) {
- DEBUGOUT_T("HANDLE_SMP_EVENT\n");
+ DEBUGOUTA("HANDLE_SMP_EVENT\n");
if (!context) return;
switch (smp_event){
case OTRL_SMPEVENT_NONE:
@@ -399,8 +399,8 @@ extern "C" {
//void otr_create_instag(void *opdata, const char *accountname, const char *protocol) {
void otr_create_instag(void *, const char *accountname, const char *protocol){
- DEBUGOUT_T("OTR_CREATE_INSTAG\n");
- FILE* instagf = _tfopen(g_instag_filename, _T("w+b"));
+ DEBUGOUTA("OTR_CREATE_INSTAG\n");
+ FILE* instagf = _tfopen(g_instag_filename, L"w+b");
if (!instagf)
return;
otrl_instag_generate_FILEp(otr_user_state, instagf, accountname, protocol);
diff --git a/plugins/MirOTR/src/stdafx.h b/plugins/MirOTR/src/stdafx.h
index 1641a2e04e..0e1dd7f382 100644
--- a/plugins/MirOTR/src/stdafx.h
+++ b/plugins/MirOTR/src/stdafx.h
@@ -64,12 +64,10 @@ using namespace std;
#ifdef _DEBUG
#define DEBUGOUTA(x) OutputDebugStringA(x)
- #define DEBUGOUT(x) OutputDebugString(x)
- #define DEBUGOUT_T(x) OutputDebugString(__T(x))
+ #define DEBUGOUTW(x) OutputDebugStringW(x)
#else
#define DEBUGOUTA(x);
- #define DEBUGOUT(x)
- #define DEBUGOUT_T(x)
+ #define DEBUGOUTW(x)
#endif
// modified manual policy - so that users set to 'opportunistic' will automatically start OTR with users set to 'manual'
diff --git a/plugins/MirOTR/src/svcs_proto.cpp b/plugins/MirOTR/src/svcs_proto.cpp
index f6edc8e7e7..9aa72920d9 100644
--- a/plugins/MirOTR/src/svcs_proto.cpp
+++ b/plugins/MirOTR/src/svcs_proto.cpp
@@ -5,7 +5,7 @@ INT_PTR SVC_OTRSendMessage(WPARAM wParam,LPARAM lParam){
CCSDATA *ccs = (CCSDATA *) lParam;
- DEBUGOUT_T("SENDING\n");
+ DEBUGOUTW(L"SENDING\n");
DEBUGOUTA("'");
DEBUGOUTA((const char*)ccs->lParam);
DEBUGOUTA("'\n");
@@ -26,7 +26,7 @@ INT_PTR SVC_OTRSendMessage(WPARAM wParam,LPARAM lParam){
// don't filter OTR messages being sent (OTR messages should only happen *after* the otrl_message_sending call below)
if(strncmp(oldmessage, "?OTR", 4) == 0) {
- DEBUGOUT_T("OTR message without PREF_BYPASS_OTR\n");
+ DEBUGOUTW(L"OTR message without PREF_BYPASS_OTR\n");
return Proto_ChainSend(wParam, ccs);
}
diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp
index 9d2d30a9ac..0fc9e6a450 100644
--- a/plugins/MirOTR/src/utils.cpp
+++ b/plugins/MirOTR/src/utils.cpp
@@ -81,7 +81,7 @@ void otrl_privkey_hash_to_humanT(TCHAR human[45], const unsigned char hash[20])
for(word=0; word<5; ++word) {
for(byte=0; byte<4; ++byte) {
- _stprintf(p, _T("%02X"), hash[word*4+byte]); //!!!!!!!!!!!!!!
+ _stprintf(p, L"%02X", hash[word*4+byte]); //!!!!!!!!!!!!!!
p += 2;
}
*(p++) = ' ';
@@ -107,7 +107,7 @@ __inline const TCHAR* contact_get_nameT(MCONTACT hContact) {
TCHAR* ProtoGetNickname(const char* proto)
{
TCHAR *p = Contact_GetInfo(CNF_NICK, NULL, proto);
- return (p != NULL) ? p : mir_tstrdup(_T(""));
+ return (p != NULL) ? p : mir_tstrdup(L"");
}
void ShowPopup(const TCHAR* line1, const TCHAR* line2, int timeout, const MCONTACT hContact) {
@@ -115,12 +115,12 @@ void ShowPopup(const TCHAR* line1, const TCHAR* line2, int timeout, const MCONTA
if ( !options.bHavePopups) {
TCHAR title[256];
- mir_sntprintf(title, _T("%s Message"), _T(MODULENAME));
+ mir_sntprintf(title, L"%s Message", _T(MODULENAME));
if(line1 && line2) {
int size = int(mir_tstrlen(line1) + mir_tstrlen(line2) + 3);
TCHAR *message = new TCHAR[size]; // newline and null terminator
- mir_sntprintf(message, size, _T("%s\r\n%s"), line1, line2);
+ mir_sntprintf(message, size, L"%s\r\n%s", line1, line2);
MessageBox( NULL, message, title, MB_OK | MB_ICONINFORMATION );
delete[] message;
} else if(line1) {
@@ -165,7 +165,7 @@ void ShowWarning(TCHAR *msg) {
if(disp == ED_POP && !options.bHavePopups) disp = ED_BAL;
if(disp == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) disp = ED_MB;
- mir_sntprintf(buffer, _T("%s Warning"), _T(MODULENAME));
+ mir_sntprintf(buffer, L"%s Warning", _T(MODULENAME));
switch(disp) {
@@ -173,7 +173,7 @@ void ShowWarning(TCHAR *msg) {
{
int size = int(mir_tstrlen(msg) + 515);
TCHAR *message = new TCHAR[size]; // newline and null terminator
- mir_sntprintf(message, size, _T("%s\r\n%s"), buffer, msg);
+ mir_sntprintf(message, size, L"%s\r\n%s", buffer, msg);
PUShowMessageT(message, SM_WARNING);
delete[] message;
}
@@ -211,7 +211,7 @@ void ShowError(TCHAR *msg) {
if(disp == ED_POP && !options.bHavePopups) disp = ED_BAL;
if(disp == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) disp = ED_MB;
- mir_sntprintf(buffer, _T("%s Error"), _T(MODULENAME));
+ mir_sntprintf(buffer, L"%s Error", _T(MODULENAME));
TCHAR *message;
@@ -220,7 +220,7 @@ void ShowError(TCHAR *msg) {
{
int size = int(mir_tstrlen(msg) + 515);
message = new TCHAR[size]; // newline and null terminator
- mir_sntprintf(message, size, _T("%s\r\n%s"), buffer, msg);
+ mir_sntprintf(message, size, L"%s\r\n%s", buffer, msg);
PUShowMessageT(message, SM_WARNING);
delete[] message;
}
@@ -269,7 +269,7 @@ void ShowErrorUtf(char* msg) {
void ShowMessageInline(const MCONTACT hContact, const TCHAR *msg) {
TCHAR buff[1024];
- mir_sntprintf(buff, _T("%s%s"), _T(LANG_INLINE_PREFIX), msg);
+ mir_sntprintf(buff, L"%s%s", _T(LANG_INLINE_PREFIX), msg);
T2Utf utf(buff);
PROTORECVEVENT pre = {0};