diff options
Diffstat (limited to 'plugins/StopSpamPlus/src/utils.cpp')
-rw-r--r-- | plugins/StopSpamPlus/src/utils.cpp | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/plugins/StopSpamPlus/src/utils.cpp b/plugins/StopSpamPlus/src/utils.cpp index 427495026c..91378b7181 100644 --- a/plugins/StopSpamPlus/src/utils.cpp +++ b/plugins/StopSpamPlus/src/utils.cpp @@ -1,35 +1,5 @@ #include "stdafx.h"
-tstring& GetDlgItemString(HWND hwnd, int id)
-{
- HWND h = GetDlgItem(hwnd, id);
- int len = GetWindowTextLength(h);
- wchar_t * buf = new wchar_t[len + 1];
- GetWindowText(h, buf, len + 1);
- static tstring s;
- s = buf;
- delete[]buf;
- return s;
-}
-
-bool IsExistMyMessage(MCONTACT hContact)
-{
- DB::ECPTR pCursor(DB::Events(hContact));
- while (MEVENT hDbEvent = pCursor.FetchNext()) {
- DBEVENTINFO dbei = {};
- if (db_event_get(hDbEvent, &dbei))
- break;
-
- if (dbei.flags & DBEF_SENT){
- // mark contact as Answered
- g_plugin.setByte(hContact, DB_KEY_ANSWERED, 1);
- // ...let the event go its way
- return true;
- }
- }
- return false;
-}
-
tstring variables_parse(const wchar_t *tstrFormat, MCONTACT hContact)
{
if (ServiceExists(MS_VARS_FORMATSTRING)) {
@@ -38,7 +8,7 @@ tstring variables_parse(const wchar_t *tstrFormat, MCONTACT hContact) fi.szFormat.w = wcsdup(tstrFormat);
fi.hContact = hContact;
fi.flags = FIF_UNICODE;
- wchar_t *tszParsed = (wchar_t*)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
+ wchar_t *tszParsed = (wchar_t *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
free(fi.szFormat.w);
if (tszParsed) {
tstring tstrResult = tszParsed;
@@ -49,7 +19,7 @@ tstring variables_parse(const wchar_t *tstrFormat, MCONTACT hContact) return tstrFormat;
}
-tstring trim(const tstring &tstr, const tstring& trimChars)
+tstring trim(const tstring &tstr, const tstring &trimChars)
{
size_t s = tstr.find_first_not_of(trimChars);
size_t e = tstr.find_last_not_of(trimChars);
|