diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-26 19:42:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-26 19:42:31 +0000 |
commit | 025b2ded7e6ae65b45502216a80e98fcc09d53b2 (patch) | |
tree | e088e455956a52cdf74a54a401db08560888c519 /src/core/stdautoaway/autoaway.cpp | |
parent | ffeae3b58ae49397f62cb733c77f565ac4070223 (diff) |
MIID_AUTOAWAY reassigned to the AAA plugin
git-svn-id: http://svn.miranda-ng.org/main/trunk@2510 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/stdautoaway/autoaway.cpp')
-rw-r--r-- | src/core/stdautoaway/autoaway.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/stdautoaway/autoaway.cpp b/src/core/stdautoaway/autoaway.cpp index a0906e22ec..921267cd9c 100644 --- a/src/core/stdautoaway/autoaway.cpp +++ b/src/core/stdautoaway/autoaway.cpp @@ -40,12 +40,12 @@ static bool Proto_IsAccountEnabled(PROTOACCOUNT* pa) static bool Proto_IsAccountLocked(PROTOACCOUNT* pa)
{
- return pa && DBGetContactSettingByte(NULL, pa->szModuleName, "LockMainStatus", 0) != 0;
+ return pa && db_get_b(NULL, pa->szModuleName, "LockMainStatus", 0) != 0;
}
static void Proto_SetStatus(const char* szProto, unsigned status)
{
- if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) {
+ if ( CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) {
TCHAR* awayMsg = (TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGW, (WPARAM) status, (LPARAM) szProto);
if ((INT_PTR)awayMsg == CALLSERVICE_NOTFOUND) {
char* awayMsgA = (char*)CallService(MS_AWAYMSG_GETSTATUSMSG, (WPARAM) status, (LPARAM) szProto);
@@ -92,19 +92,19 @@ static int AutoAwayEvent(WPARAM, LPARAM lParam) continue;
}
if (currentstatus >= ID_STATUS_ONLINE && currentstatus != ID_STATUS_INVISIBLE) {
- if ((lParam&IDF_ISIDLE) && (currentstatus == ID_STATUS_ONLINE || currentstatus == ID_STATUS_FREECHAT)) {
- DBWriteContactSettingByte(NULL, AA_MODULE, pa->szModuleName, 1);
+ if ((lParam & IDF_ISIDLE) && (currentstatus == ID_STATUS_ONLINE || currentstatus == ID_STATUS_FREECHAT)) {
+ db_set_b(NULL, AA_MODULE, pa->szModuleName, 1);
Proto_SetStatus(pa->szModuleName, status);
}
- else if ( !(lParam & IDF_ISIDLE) && DBGetContactSettingByte(NULL, AA_MODULE, pa->szModuleName, 0)) {
+ else if ( !(lParam & IDF_ISIDLE) && db_get_b(NULL, AA_MODULE, pa->szModuleName, 0)) {
// returning from idle and this proto was set away, set it back
- DBWriteContactSettingByte(NULL, AA_MODULE, pa->szModuleName, 0);
+ db_set_b(NULL, AA_MODULE, pa->szModuleName, 0);
if ( !mii.aaLock)
Proto_SetStatus(pa->szModuleName, ID_STATUS_ONLINE);
} } }
if (mii.idlesoundsoff)
- iBreakSounds = (lParam&IDF_ISIDLE) != 0;
+ iBreakSounds = (lParam & IDF_ISIDLE) != 0;
return 0;
}
|