From ddba4ede6b451d0cfcd0d32b5180fbd0689966bf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 08:04:30 +0000 Subject: - HANDLE hContact => HCONTACT - GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/StopSpamMod/src/utilities.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'plugins/StopSpamMod/src/utilities.cpp') 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 contacts; - for(HANDLE hContact = db_find_first(proto.c_str()); hContact; hContact = db_find_next(hContact, proto.c_str())) + std::list 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::iterator end = contacts.end(); - for(std::list::iterator i = contacts.begin(); i != end; ++i) + std::list::iterator end = contacts.end(); + for(std::list::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 contacts; - for(HANDLE hContact = db_find_first(proto.c_str()); hContact; hContact = db_find_next(hContact, proto.c_str())) + std::list 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::iterator end = contacts.end(); - for(std::list::iterator i = contacts.begin(); i != end; ++i) + std::list::iterator end = contacts.end(); + for(std::list::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) { -- cgit v1.2.3