summaryrefslogtreecommitdiff
path: root/plugins/StopSpamMod/src/utilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/StopSpamMod/src/utilities.cpp')
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index 73ab682878..ac092f927d 100755
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -18,7 +18,7 @@
#include "headers.h"
-tstring DBGetContactSettingStringPAN(HANDLE hContact, char const * szModule, char const * szSetting, tstring errorValue)
+tstring DBGetContactSettingStringPAN(HCONTACT hContact, char const * szModule, char const * szSetting, tstring errorValue)
{
DBVARIANT dbv;
//if(db_get(hContact, szModule, szSetting, &dbv))
@@ -30,7 +30,7 @@ tstring DBGetContactSettingStringPAN(HANDLE hContact, char const * szModule, cha
return errorValue;
}
-std::string DBGetContactSettingStringPAN_A(HANDLE hContact, char const * szModule, char const * szSetting, std::string errorValue)
+std::string DBGetContactSettingStringPAN_A(HCONTACT hContact, char const * szModule, char const * szSetting, std::string errorValue)
{
DBVARIANT dbv;
//if(db_get(hContact, szModule, szSetting, &dbv))
@@ -97,7 +97,7 @@ int RemoveTmp(WPARAM,LPARAM)
return 0;
}
-tstring variables_parse(tstring const &tstrFormat, HANDLE hContact){
+tstring variables_parse(tstring const &tstrFormat, HCONTACT hContact){
if (gbVarsServiceExist) {
FORMATINFO fi;
TCHAR *tszParsed;
@@ -201,7 +201,7 @@ BOOL IsUrlContains(TCHAR * Str)
return 0;
}
-tstring GetContactUid(HANDLE hContact, tstring Protocol)
+tstring GetContactUid(HCONTACT hContact, tstring Protocol)
{
tstring Uid;
TCHAR dUid[32]={0};
@@ -235,7 +235,7 @@ tstring GetContactUid(HANDLE hContact, tstring Protocol)
return Uid;
}
-void LogSpamToFile(HANDLE hContact, tstring message)
+void LogSpamToFile(HCONTACT hContact, tstring message)
{
if (!gbLogToFile) return;
@@ -293,15 +293,15 @@ void CleanProtocolTmpThread(std::string proto)
boost::this_thread::sleep(boost::posix_time::seconds(2));
}
- std::list<HANDLE> contacts;
- for(HANDLE hContact = db_find_first(proto.c_str()); hContact; hContact = db_find_next(hContact, proto.c_str()))
+ std::list<HCONTACT> contacts;
+ for(HCONTACT hContact = db_find_first(proto.c_str()); hContact; hContact = db_find_next(hContact, proto.c_str()))
if(db_get_b(hContact, "CList", "NotOnList", 0)|| (_T("Not In List")== DBGetContactSettingStringPAN(hContact,"CList","Group",_T(""))))
contacts.push_back(hContact);
boost::this_thread::sleep(boost::posix_time::seconds(5));
clean_mutex.lock();
- std::list<HANDLE>::iterator end = contacts.end();
- for(std::list<HANDLE>::iterator i = contacts.begin(); i != end; ++i)
+ std::list<HCONTACT>::iterator end = contacts.end();
+ for(std::list<HCONTACT>::iterator i = contacts.begin(); i != end; ++i)
{
LogSpamToFile(*i, _T("Deleted"));
HistoryLogFunc(*i, "Deleted");
@@ -320,15 +320,15 @@ void CleanProtocolExclThread(std::string proto)
boost::this_thread::sleep(boost::posix_time::seconds(2));
}
- std::list<HANDLE> contacts;
- for(HANDLE hContact = db_find_first(proto.c_str()); hContact; hContact = db_find_next(hContact, proto.c_str()))
+ std::list<HCONTACT> contacts;
+ for(HCONTACT hContact = db_find_first(proto.c_str()); hContact; hContact = db_find_next(hContact, proto.c_str()))
if(db_get_b(hContact, "CList", "NotOnList", 0) && db_get_b(hContact, pluginName, "Excluded", 0))
contacts.push_back(hContact);
boost::this_thread::sleep(boost::posix_time::seconds(5));
clean_mutex.lock();
- std::list<HANDLE>::iterator end = contacts.end();
- for(std::list<HANDLE>::iterator i = contacts.begin(); i != end; ++i)
+ std::list<HCONTACT>::iterator end = contacts.end();
+ for(std::list<HCONTACT>::iterator i = contacts.begin(); i != end; ++i)
{
LogSpamToFile(*i, _T("Deleted"));
HistoryLogFunc(*i, "Deleted");
@@ -358,7 +358,7 @@ void CleanThread()
}
}
-void HistoryLog(HANDLE hContact, char *data, int event_type, int flags)
+void HistoryLog(HCONTACT hContact, char *data, int event_type, int flags)
{
DBEVENTINFO Event = { sizeof(Event) };
Event.szModule = pluginName;
@@ -370,7 +370,7 @@ void HistoryLog(HANDLE hContact, char *data, int event_type, int flags)
db_event_add(hContact, &Event);
}
-void HistoryLogFunc(HANDLE hContact, std::string message)
+void HistoryLogFunc(HCONTACT hContact, std::string message)
{
if(gbHistoryLog)
{