summaryrefslogtreecommitdiff
path: root/plugins/StopSpamMod
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/StopSpamMod
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
less TCHARs:
- TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StopSpamMod')
-rwxr-xr-xplugins/StopSpamMod/src/init.cpp14
-rwxr-xr-xplugins/StopSpamMod/src/options.cpp22
-rwxr-xr-xplugins/StopSpamMod/src/stopspam.cpp34
-rwxr-xr-xplugins/StopSpamMod/src/stopspam.h10
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp56
-rwxr-xr-xplugins/StopSpamMod/src/utilities.h20
6 files changed, 78 insertions, 78 deletions
diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp
index 4b8ef5167e..453dc319ef 100755
--- a/plugins/StopSpamMod/src/init.cpp
+++ b/plugins/StopSpamMod/src/init.cpp
@@ -43,14 +43,14 @@ BOOL gbMathExpression = 0;
HANDLE hStopSpamLogDirH=0;
-tstring gbSpammersGroup = L"Spammers";
-tstring gbAutoAuthGroup = L"NotSpammers";
+wstring gbSpammersGroup = L"Spammers";
+wstring gbAutoAuthGroup = L"NotSpammers";
-tstring gbQuestion;
-tstring gbAnswer;
-tstring gbCongratulation;
+wstring gbQuestion;
+wstring gbAnswer;
+wstring gbCongratulation;
std::wstring gbAuthRepl;
-extern TCHAR const * defQuestion;
+extern wchar_t const * defQuestion;
extern int RemoveTmp(WPARAM,LPARAM);
/////////////////////////////////////////////////////////////////////////////////////////
@@ -75,7 +75,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
return &pluginInfoEx;
}
-extern tstring DBGetContactSettingStringPAN(MCONTACT hContact, char const * szModule, char const * szSetting, tstring errorValue);
+extern wstring DBGetContactSettingStringPAN(MCONTACT hContact, char const * szModule, char const * szSetting, wstring errorValue);
void InitVars()
{
diff --git a/plugins/StopSpamMod/src/options.cpp b/plugins/StopSpamMod/src/options.cpp
index 7c4e557c06..8cc6139b5c 100755
--- a/plugins/StopSpamMod/src/options.cpp
+++ b/plugins/StopSpamMod/src/options.cpp
@@ -18,7 +18,7 @@
#include "stdafx.h"
char *pluginDescription = LPGEN("No more spam! Robots can't go! Only human beings invited!\r\n\r\nThis plugin works pretty simple:\r\nWhile messages from users on your contact list go as there is no any anti-spam software, messages from unknown users are not delivered to you. But also they are not ignored, this plugin replies with a simple question, and if user gives the right answer, plugin adds him to your contact list so that he can contact you.");
-TCHAR const *defQuestion = TranslateT("Spammers made me to install small anti-spam system you are now speaking with.\r\nPlease reply \"nospam\" without quotes and spaces if you want to contact me.");
+wchar_t const *defQuestion = TranslateT("Spammers made me to install small anti-spam system you are now speaking with.\r\nPlease reply \"nospam\" without quotes and spaces if you want to contact me.");
INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -143,7 +143,7 @@ INT_PTR CALLBACK ProtoDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
if (LB_ERR != n) {
size_t len = SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_GETTEXTLEN, n, 0);
if (LB_ERR != len) {
- TCHAR * buf = new TCHAR[len + 1];
+ wchar_t * buf = new wchar_t[len + 1];
SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_GETTEXT, n, (LPARAM)buf);
SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_ADDSTRING, 0, (LPARAM)buf);
delete[]buf;
@@ -157,7 +157,7 @@ INT_PTR CALLBACK ProtoDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
if (LB_ERR != n) {
size_t len = SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_GETTEXTLEN, n, 0);
if (LB_ERR != len) {
- TCHAR * buf = new TCHAR[len + 1];
+ wchar_t * buf = new wchar_t[len + 1];
SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_GETTEXT, n, (LPARAM)buf);
SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_ADDSTRING, 0, (LPARAM)buf);
delete[]buf;
@@ -270,7 +270,7 @@ INT_PTR CALLBACK AdvancedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
db_set_b(NULL, pluginName, "CaseInsensitive", gbCaseInsensitive = BST_CHECKED == IsDlgButtonChecked(hwnd, IDC_CASE_INSENSITIVE));
db_set_b(NULL, pluginName, "DisableInInvis", gbInvisDisable = BST_CHECKED == IsDlgButtonChecked(hwnd, IDC_INVIS_DISABLE));
{
- static tstring NewGroupName, CurrentGroupName;
+ static wstring NewGroupName, CurrentGroupName;
NewGroupName = GetDlgItemString(hwnd, ID_SPECIALGROUPNAME);
CurrentGroupName = gbSpammersGroup = DBGetContactSettingStringPAN(NULL, pluginName, "SpammersGroup", L"0");
if (mir_wstrcmp(CurrentGroupName.c_str(), NewGroupName.c_str()) != 0) {
@@ -294,7 +294,7 @@ INT_PTR CALLBACK AdvancedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
db_set_b(NULL, pluginName, "HistoryLog", gbHistoryLog = BST_CHECKED == IsDlgButtonChecked(hwnd, IDC_HISTORY_LOG));
db_set_b(NULL, pluginName, "MathExpression", gbMathExpression = BST_CHECKED == IsDlgButtonChecked(hwnd, IDC_MATH_QUESTION));
{
- static tstring NewAGroupName, CurrentAGroupName;
+ static wstring NewAGroupName, CurrentAGroupName;
NewAGroupName = GetDlgItemString(hwnd, IDC_AUTOADDGROUP);
CurrentAGroupName = gbAutoAuthGroup = DBGetContactSettingStringPAN(NULL, pluginName, "AutoAuthGroup", L"0");
if (mir_wstrcmp(CurrentAGroupName.c_str(), NewAGroupName.c_str()) != 0) {
@@ -318,29 +318,29 @@ MIRANDA_HOOK_EVENT(ME_OPT_INITIALISE, w, l)
UNREFERENCED_PARAMETER(l);
OPTIONSDIALOGPAGE odp = { 0 };
- odp.ptszGroup = LPGENT("Message sessions");
- odp.ptszTitle = LPGENT("StopSpam");
+ odp.pwszGroup = LPGENW("Message sessions");
+ odp.pwszTitle = LPGENW("StopSpam");
odp.position = -1;
odp.hInstance = hInst;
odp.flags = ODPF_TCHAR;
- odp.ptszTab = LPGENT("General");
+ odp.pwszTab = LPGENW("General");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_MAIN);
odp.pfnDlgProc = MainDlgProc;
Options_AddPage(w, &odp);
- odp.ptszTab = LPGENT("Messages");
+ odp.pwszTab = LPGENW("Messages");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_MESSAGES);
odp.pfnDlgProc = MessagesDlgProc;
Options_AddPage(w, &odp);
- odp.ptszTab = LPGENT("Accounts");
+ odp.pwszTab = LPGENW("Accounts");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_PROTO);
odp.pfnDlgProc = ProtoDlgProc;
Options_AddPage(w, &odp);
- odp.ptszTab = LPGENT("Advanced");
+ odp.pwszTab = LPGENW("Advanced");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_ADVANCED);
odp.pfnDlgProc = AdvancedDlgProc;
Options_AddPage(w, &odp);
diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp
index 918ec129aa..c5cc135954 100755
--- a/plugins/StopSpamMod/src/stopspam.cpp
+++ b/plugins/StopSpamMod/src/stopspam.cpp
@@ -49,7 +49,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, hContact, hDbEvent)
db_set_ws(hcntct, "CList", "Group", gbSpammersGroup.c_str());
BYTE msg = 1;
if (gbIgnoreURL) {
- TCHAR* EventText = ReqGetText(&dbei); //else return NULL
+ wchar_t* EventText = ReqGetText(&dbei); //else return NULL
msg = !IsUrlContains(EventText);
mir_free(EventText);
}
@@ -110,7 +110,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
// reject processing of the event
return 1;
- tstring message;
+ wstring message;
if (dbei->flags & DBEF_UTF) {
wchar_t* msg_u;
@@ -136,7 +136,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
bool answered = false;
if (gbMathExpression) {
if (boost::algorithm::all(message, boost::is_digit())) {
- int num = _ttoi(message.c_str());
+ int num = _wtoi(message.c_str());
int math_answer = db_get_dw(hContact, pluginName, "MathAnswer", 0);
if (num && math_answer)
answered = (num == math_answer);
@@ -173,7 +173,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
// send congratulation
if (bSendMsg) {
- tstring prot = DBGetContactSettingStringPAN(NULL, dbei->szModule, "AM_BaseProto", L"");
+ wstring prot = DBGetContactSettingStringPAN(NULL, dbei->szModule, "AM_BaseProto", L"");
// for notICQ protocols or disable auto auth. reqwest
if ((Stricmp(L"ICQ", prot.c_str())) || (!gbAutoReqAuth)) {
char * buf = mir_utf8encodeW(variables_parse(gbCongratulation, hContact).c_str());
@@ -199,23 +199,23 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
return 0;
}
// URL contains check
- bSendMsg = (bSendMsg && gbIgnoreURL) ? (!IsUrlContains((TCHAR *)message.c_str())) : bSendMsg;
+ bSendMsg = (bSendMsg && gbIgnoreURL) ? (!IsUrlContains((wchar_t *)message.c_str())) : bSendMsg;
// if message message does not contain infintite talk protection prefix
// and question count for this contact is less then maximum
if (bSendMsg) {
- if ((!gbInfTalkProtection || tstring::npos == message.find(L"StopSpam automatic message:\r\n"))
+ if ((!gbInfTalkProtection || wstring::npos == message.find(L"StopSpam automatic message:\r\n"))
&& (!gbMaxQuestCount || db_get_dw(hContact, pluginName, "QuestionCount", 0) < gbMaxQuestCount)) {
// send question
- tstring q;
+ wstring q;
if (gbInfTalkProtection)
q += L"StopSpam automatic message:\r\n";
if (gbMathExpression) { //parse math expression in question
- tstring tmp_question = gbQuestion;
+ wstring tmp_question = gbQuestion;
std::list<int> args;
- std::list<TCHAR> actions;
- tstring::size_type p1 = gbQuestion.find(L"X"), p2 = 0;
- const tstring expr_chars = L"X+-/*", expr_acts = L"+-/*";
- while (p1 < gbQuestion.length() && p1 != tstring::npos && expr_chars.find(gbQuestion[p1]) != tstring::npos) {
+ std::list<wchar_t> actions;
+ wstring::size_type p1 = gbQuestion.find(L"X"), p2 = 0;
+ const wstring expr_chars = L"X+-/*", expr_acts = L"+-/*";
+ while (p1 < gbQuestion.length() && p1 != wstring::npos && expr_chars.find(gbQuestion[p1]) != wstring::npos) {
std::string arg;
p2 = p1;
for (p1 = gbQuestion.find(L"X", p1); (p1 < gbQuestion.length()) && (gbQuestion[p1] == L'X'); ++p1)
@@ -224,7 +224,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
tmp_question.replace(p2, arg.size(), toUTF16(arg));
args.push_back(atoi(arg.c_str()));
- if ((p1 < gbQuestion.length()) && (p1 != tstring::npos) && (expr_acts.find(gbQuestion[p1]) != tstring::npos))
+ if ((p1 < gbQuestion.length()) && (p1 != wstring::npos) && (expr_acts.find(gbQuestion[p1]) != wstring::npos))
actions.push_back(gbQuestion[p1]);
++p1;
}
@@ -234,25 +234,25 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
while (!args.empty()) {
if (!actions.empty()) {
switch (actions.front()) {
- case _T('+'):
+ case '+':
{
math_answer += args.front();
args.pop_front();
}
break;
- case _T('-'):
+ case '-':
{
math_answer -= args.front();
args.pop_front();
}
break;
- case _T('/'):
+ case '/':
{
math_answer /= args.front();
args.pop_front();
}
break;
- case _T('*'):
+ case '*':
{
math_answer *= args.front();
args.pop_front();
diff --git a/plugins/StopSpamMod/src/stopspam.h b/plugins/StopSpamMod/src/stopspam.h
index b783dc4d40..6b76869416 100755
--- a/plugins/StopSpamMod/src/stopspam.h
+++ b/plugins/StopSpamMod/src/stopspam.h
@@ -17,14 +17,14 @@ extern BOOL gbHistoryLog;
extern BOOL gbInvisDisable;
extern BOOL gbIgnoreURL;
extern BOOL gbMathExpression;
-extern tstring gbSpammersGroup;
-extern tstring gbQuestion;
-extern tstring gbAnswer;
-extern tstring gbCongratulation;
+extern wstring gbSpammersGroup;
+extern wstring gbQuestion;
+extern wstring gbAnswer;
+extern wstring gbCongratulation;
extern std::wstring gbAuthRepl;
extern BOOL gbAutoAuth;
extern BOOL gbAutoAddToServerList;
extern BOOL gbAutoReqAuth;
-extern tstring gbAutoAuthGroup;
+extern wstring gbAutoAuthGroup;
extern BOOL gbLogToFile;
extern BOOL gbDelAllTempory;
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index bfa076de6a..e2fa1253d1 100755
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -17,7 +17,7 @@
#include "stdafx.h"
-tstring DBGetContactSettingStringPAN(MCONTACT hContact, char const * szModule, char const * szSetting, tstring errorValue)
+wstring DBGetContactSettingStringPAN(MCONTACT hContact, char const * szModule, char const * szSetting, wstring errorValue)
{
DBVARIANT dbv;
//if(db_get(hContact, szModule, szSetting, &dbv))
@@ -41,13 +41,13 @@ std::string DBGetContactSettingStringPAN_A(MCONTACT hContact, char const * szMod
return errorValue;
}
-tstring &GetDlgItemString(HWND hwnd, int id)
+wstring &GetDlgItemString(HWND hwnd, int id)
{
HWND h = GetDlgItem(hwnd, id);
int len = GetWindowTextLength(h);
- TCHAR * buf = new TCHAR[len + 1];
+ wchar_t * buf = new wchar_t[len + 1];
GetWindowText(h, buf, len + 1);
- static tstring s;
+ static wstring s;
s = buf;
delete[]buf;
return s;
@@ -64,13 +64,13 @@ bool ProtoInList(std::string proto)
return std::string::npos != GetProtoList().find(proto + "\r\n");
}
-void DeleteCListGroupsByName(TCHAR* szGroupName)
+void DeleteCListGroupsByName(wchar_t* szGroupName)
{
BYTE ConfirmDelete = db_get_b(NULL, "CList", "ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT);
if (ConfirmDelete)
db_set_b(NULL, "CList", "ConfirmDelete", 0);
- TCHAR *szGroup;
+ wchar_t *szGroup;
for (int i = 1; (szGroup = Clist_GroupGetName(i, NULL)) != NULL; i++)
if (!mir_wstrcmp(szGroupName, szGroup))
Clist_GroupDelete(i);
@@ -86,19 +86,19 @@ int RemoveTmp(WPARAM, LPARAM)
return 0;
}
-tstring variables_parse(tstring const &tstrFormat, MCONTACT hContact)
+wstring variables_parse(wstring const &tstrFormat, MCONTACT hContact)
{
if (gbVarsServiceExist) {
FORMATINFO fi;
- TCHAR *tszParsed;
- tstring tstrResult;
+ wchar_t *tszParsed;
+ wstring tstrResult;
memset(&fi, 0, sizeof(fi));
fi.cbSize = sizeof(fi);
- fi.tszFormat = _tcsdup(tstrFormat.c_str());
+ fi.tszFormat = wcsdup(tstrFormat.c_str());
fi.hContact = hContact;
fi.flags |= FIF_TCHAR;
- tszParsed = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
+ tszParsed = (wchar_t *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
free(fi.tszFormat);
if (tszParsed) {
tstrResult = tszParsed;
@@ -111,13 +111,13 @@ tstring variables_parse(tstring const &tstrFormat, MCONTACT hContact)
// case-insensitive mir_tstrcmp
//by nullbie as i remember...
-#define NEWTSTR_MALLOC(A) (A==NULL) ? NULL : mir_tstrcpy((TCHAR*)mir_alloc(sizeof(TCHAR)*(mir_tstrlen(A)+1)),A)
-const int Stricmp(const TCHAR *str, const TCHAR *substr)
+#define NEWTSTR_MALLOC(A) (A==NULL) ? NULL : mir_tstrcpy((wchar_t*)mir_alloc(sizeof(wchar_t)*(mir_tstrlen(A)+1)),A)
+const int Stricmp(const wchar_t *str, const wchar_t *substr)
{
int i = 0;
- TCHAR *str_up = NEWTSTR_MALLOC(str);
- TCHAR *substr_up = NEWTSTR_MALLOC(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));
@@ -130,7 +130,7 @@ const int Stricmp(const TCHAR *str, const TCHAR *substr)
return i;
}
-TCHAR* ReqGetText(DBEVENTINFO* dbei)
+wchar_t* ReqGetText(DBEVENTINFO* dbei)
{
if (!dbei->pBlob)
return 0;
@@ -152,15 +152,15 @@ TCHAR* ReqGetText(DBEVENTINFO* dbei)
WCHAR* msg = NULL;
msg = (dbei->flags&DBEF_UTF) ? mir_utf8decodeW(tstr) : mir_a2u(tstr);
mir_free(tstr);
- return (TCHAR *)msg;
+ return (wchar_t *)msg;
};
return 0;
}
-BOOL IsUrlContains(TCHAR * Str)
+BOOL IsUrlContains(wchar_t * Str)
{
const int CountUrl = 11;
- const TCHAR URL[CountUrl][5] =
+ const wchar_t URL[CountUrl][5] =
{
L"http",
L"www",
@@ -176,10 +176,10 @@ BOOL IsUrlContains(TCHAR * Str)
};
if (Str && mir_tstrlen(Str) > 0) {
- TCHAR *StrLower = NEWTSTR_MALLOC(Str);
+ wchar_t *StrLower = NEWTSTR_MALLOC(Str);
CharLowerBuff(StrLower, (int)mir_tstrlen(StrLower));
for (int i = 0; i < CountUrl; i++)
- if (_tcsstr(StrLower, URL[i])) {
+ if (wcsstr(StrLower, URL[i])) {
mir_free(StrLower);
return 1;
}
@@ -188,27 +188,27 @@ BOOL IsUrlContains(TCHAR * Str)
return 0;
}
-tstring GetContactUid(MCONTACT hContact, tstring Protocol)
+wstring GetContactUid(MCONTACT hContact, wstring Protocol)
{
char *szProto = mir_utf8encodeW(Protocol.c_str());
ptrT uid(Contact_GetInfo(CNF_DISPLAYUID, hContact, szProto));
return (uid) ? uid : L"";
}
-void LogSpamToFile(MCONTACT hContact, tstring message)
+void LogSpamToFile(MCONTACT hContact, wstring message)
{
if (!gbLogToFile) return;
- tstring LogStrW, LogTime, LogProtocol, LogContactId, LogContactName;
+ wstring LogStrW, LogTime, LogProtocol, LogContactId, LogContactName;
std::fstream file;
- TCHAR pszName[MAX_PATH];
+ wchar_t pszName[MAX_PATH];
if (hStopSpamLogDirH)
FoldersGetCustomPathT(hStopSpamLogDirH, pszName, MAX_PATH, L"");
else
mir_tstrncpy(pszName, VARST(L"%miranda_logpath%"), _countof(pszName));
- tstring filename = pszName;
+ wstring filename = pszName;
filename += L"\\stopspam_mod.log";
file.open(filename.c_str(), std::ios::out | std::ios::app);
@@ -222,7 +222,7 @@ void LogSpamToFile(MCONTACT hContact, tstring message)
// Name, UID and Protocol Log line
LogProtocol = DBGetContactSettingStringPAN(hContact, "Protocol", "p", L"");
- LogContactName = (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0);
+ LogContactName = (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0);
LogContactId = (LogProtocol == L"") ? L"" : GetContactUid(hContact, LogProtocol);
// Name, UID and Protocol Log line
@@ -331,7 +331,7 @@ void HistoryLogFunc(MCONTACT hContact, std::string message)
std::string msg = message;
msg.append("\n");
msg.append("Protocol: ").append(GetContactProto(hContact)).append(" Contact: ");
- msg.append(toUTF8((TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0))).append(" ID: ");
+ msg.append(toUTF8((wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0))).append(" ID: ");
msg.append(toUTF8(GetContactUid(hContact, toUTF16(GetContactProto(hContact)))));
HistoryLog(NULL, (char*)msg.c_str(), EVENTTYPE_MESSAGE, DBEF_READ);
}
diff --git a/plugins/StopSpamMod/src/utilities.h b/plugins/StopSpamMod/src/utilities.h
index 4120d0dec9..b0ffab994c 100755
--- a/plugins/StopSpamMod/src/utilities.h
+++ b/plugins/StopSpamMod/src/utilities.h
@@ -1,17 +1,17 @@
-tstring DBGetContactSettingStringPAN(MCONTACT hContact, char const * szModule, char const * szSetting, tstring errorValue);
+std::wstring DBGetContactSettingStringPAN(MCONTACT hContact, char const * szModule, char const * szSetting, std::wstring errorValue);
std::string DBGetContactSettingStringPAN_A(MCONTACT hContact, char const * szModule, char const * szSetting, std::string errorValue);
-tstring &GetDlgItemString(HWND hwnd, int id);
+std::wstring &GetDlgItemString(HWND hwnd, int id);
std::string &GetProtoList();
bool ProtoInList(std::string proto);
void RemoveExcludedUsers();
-tstring variables_parse(tstring const &tstrFormat, MCONTACT hContact);
-const int Stricmp(const TCHAR *str, const TCHAR *substr);
-//const int Stristr(const TCHAR *str, const TCHAR *substr);
-TCHAR* ReqGetText(DBEVENTINFO* dbei);
-BOOL IsUrlContains(TCHAR * Str);
-void DeleteCListGroupsByName(TCHAR* szGroupName);
-tstring GetContactUid(MCONTACT hContact, std::string Protocol);
-void LogSpamToFile(MCONTACT hContact, tstring message);
+std::wstring variables_parse(std::wstring const &tstrFormat, MCONTACT hContact);
+const int Stricmp(const wchar_t *str, const wchar_t *substr);
+//const int Stristr(const wchar_t *str, const wchar_t *substr);
+wchar_t* ReqGetText(DBEVENTINFO* dbei);
+BOOL IsUrlContains(wchar_t * Str);
+void DeleteCListGroupsByName(wchar_t* szGroupName);
+std::wstring GetContactUid(MCONTACT hContact, std::string Protocol);
+void LogSpamToFile(MCONTACT hContact, std::wstring message);
std::string toUTF8(std::wstring str);
std::string toUTF8(std::string str);
std::wstring toUTF16(std::string str);