diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
commit | 2f261839b60692e33d0e160344d0d636d49c90ba (patch) | |
tree | 187921722698b681d29df3f6e60fb18394a5e9d5 /plugins/StopSpamMod/src | |
parent | 2e931a0b2780587d85f3902468c935f5adba70c8 (diff) |
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StopSpamMod/src')
-rwxr-xr-x | plugins/StopSpamMod/src/stopspam.cpp | 2 | ||||
-rwxr-xr-x | plugins/StopSpamMod/src/utilities.cpp | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp index c5cc135954..3f5311b9ad 100755 --- a/plugins/StopSpamMod/src/stopspam.cpp +++ b/plugins/StopSpamMod/src/stopspam.cpp @@ -143,7 +143,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) } } else if (!gbRegexMatch) - answered = gbCaseInsensitive ? (!Stricmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))) : (!mir_tstrcmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))); + answered = gbCaseInsensitive ? (!Stricmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))) : (!mir_wstrcmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))); else { if (gbCaseInsensitive) { std::string check(toUTF8(variables_parse(gbAnswer, hContact))), msg(toUTF8(message)); diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp index e2fa1253d1..bb2086b078 100755 --- a/plugins/StopSpamMod/src/utilities.cpp +++ b/plugins/StopSpamMod/src/utilities.cpp @@ -109,9 +109,9 @@ wstring variables_parse(wstring const &tstrFormat, MCONTACT hContact) return tstrFormat;
}
-// case-insensitive mir_tstrcmp
+// case-insensitive mir_wstrcmp
//by nullbie as i remember...
-#define NEWTSTR_MALLOC(A) (A==NULL) ? NULL : mir_tstrcpy((wchar_t*)mir_alloc(sizeof(wchar_t)*(mir_tstrlen(A)+1)),A)
+#define NEWTSTR_MALLOC(A) (A==NULL) ? NULL : mir_wstrcpy((wchar_t*)mir_alloc(sizeof(wchar_t)*(mir_wstrlen(A)+1)),A)
const int Stricmp(const wchar_t *str, const wchar_t *substr)
{
int i = 0;
@@ -119,10 +119,10 @@ const int Stricmp(const wchar_t *str, const wchar_t *substr) wchar_t *str_up = NEWTSTR_MALLOC(str);
wchar_t *substr_up = NEWTSTR_MALLOC(substr);
- CharUpperBuff(str_up, (int)mir_tstrlen(str_up));
- CharUpperBuff(substr_up, (int)mir_tstrlen(substr_up));
+ CharUpperBuff(str_up, (int)mir_wstrlen(str_up));
+ CharUpperBuff(substr_up, (int)mir_wstrlen(substr_up));
- i = mir_tstrcmp(str_up, substr_up);
+ i = mir_wstrcmp(str_up, substr_up);
mir_free(str_up);
mir_free(substr_up);
@@ -175,9 +175,9 @@ BOOL IsUrlContains(wchar_t * Str) L".tv"
};
- if (Str && mir_tstrlen(Str) > 0) {
+ if (Str && mir_wstrlen(Str) > 0) {
wchar_t *StrLower = NEWTSTR_MALLOC(Str);
- CharLowerBuff(StrLower, (int)mir_tstrlen(StrLower));
+ CharLowerBuff(StrLower, (int)mir_wstrlen(StrLower));
for (int i = 0; i < CountUrl; i++)
if (wcsstr(StrLower, URL[i])) {
mir_free(StrLower);
@@ -191,7 +191,7 @@ BOOL IsUrlContains(wchar_t * Str) wstring GetContactUid(MCONTACT hContact, wstring Protocol)
{
char *szProto = mir_utf8encodeW(Protocol.c_str());
- ptrT uid(Contact_GetInfo(CNF_DISPLAYUID, hContact, szProto));
+ ptrW uid(Contact_GetInfo(CNF_DISPLAYUID, hContact, szProto));
return (uid) ? uid : L"";
}
@@ -206,7 +206,7 @@ void LogSpamToFile(MCONTACT hContact, wstring message) if (hStopSpamLogDirH)
FoldersGetCustomPathT(hStopSpamLogDirH, pszName, MAX_PATH, L"");
else
- mir_tstrncpy(pszName, VARST(L"%miranda_logpath%"), _countof(pszName));
+ mir_wstrncpy(pszName, VARST(L"%miranda_logpath%"), _countof(pszName));
wstring filename = pszName;
filename += L"\\stopspam_mod.log";
|