diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-05 22:27:16 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-05 22:27:16 +0000 |
commit | 007b4c7301f0d26a72f89f74e9929f42e24eb3e6 (patch) | |
tree | b1ee30b70c6e36d1a06aed6885cb80dc560a68ca /plugins/StatusPlugins/AdvancedAutoAway | |
parent | f4a1bbc6ba4b8137cb868639ac146aa97e97e9df (diff) |
- rest of menus cleared;
- old database macroses wiped out from all plugins (left in m_database.h for compatibility)
git-svn-id: http://svn.miranda-ng.org/main/trunk@4324 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/AdvancedAutoAway')
4 files changed, 53 insertions, 53 deletions
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp index b40e45960f..6e53e477f3 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp @@ -129,16 +129,16 @@ void LoadOptions( OBJLIST<TAAAProtoSetting>& loadSettings, BOOL override) if (hAutoAwayTimer != 0)
KillTimer(NULL, hAutoAwayTimer);
- ignoreLockKeys = DBGetContactSettingByte(NULL, MODULENAME, SETTING_IGNLOCK, FALSE);
- ignoreSysKeys = DBGetContactSettingByte(NULL, MODULENAME, SETTING_IGNSYSKEYS, FALSE);
- ignoreAltCombo = DBGetContactSettingByte(NULL, MODULENAME, SETTING_IGNALTCOMBO, FALSE);
- monitorMouse = DBGetContactSettingByte(NULL, MODULENAME, SETTING_MONITORMOUSE, TRUE);
- monitorKeyboard = DBGetContactSettingByte(NULL, MODULENAME, SETTING_MONITORKEYBOARD, TRUE);
+ ignoreLockKeys = db_get_b(NULL, MODULENAME, SETTING_IGNLOCK, FALSE);
+ ignoreSysKeys = db_get_b(NULL, MODULENAME, SETTING_IGNSYSKEYS, FALSE);
+ ignoreAltCombo = db_get_b(NULL, MODULENAME, SETTING_IGNALTCOMBO, FALSE);
+ monitorMouse = db_get_b(NULL, MODULENAME, SETTING_MONITORMOUSE, TRUE);
+ monitorKeyboard = db_get_b(NULL, MODULENAME, SETTING_MONITORKEYBOARD, TRUE);
lastInput = lastMirandaInput = GetTickCount();
for ( int i=0; i < loadSettings.getCount(); i++ ) {
char* protoName;
- if ((DBGetContactSettingByte(NULL, MODULENAME, SETTING_SAMESETTINGS, 0)) && !override)
+ if ((db_get_b(NULL, MODULENAME, SETTING_SAMESETTINGS, 0)) && !override)
protoName = SETTING_ALL;
else
protoName = loadSettings[i].szName;
@@ -150,34 +150,34 @@ void LoadOptions( OBJLIST<TAAAProtoSetting>& loadSettings, BOOL override) monitorAll = TRUE;
} }
- if (DBGetContactSettingByte(NULL, "Idle", "AAEnable", 0))
+ if (db_get_b(NULL, "Idle", "AAEnable", 0))
return;
HookWindowsHooks(monitorMiranda, monitorAll);
- hAutoAwayTimer = SetTimer(NULL,0, DBGetContactSettingWord(NULL, MODULENAME, SETTING_AWAYCHECKTIMEINSECS, 5)*1000,AutoAwayTimer);
+ hAutoAwayTimer = SetTimer(NULL,0, db_get_w(NULL, MODULENAME, SETTING_AWAYCHECKTIMEINSECS, 5)*1000,AutoAwayTimer);
}
int LoadAutoAwaySetting(TAAAProtoSetting& autoAwaySetting, char* protoName)
{
char setting[128];
_snprintf(setting, sizeof(setting), "%s_OptionFlags", protoName);
- autoAwaySetting.optionFlags = DBGetContactSettingByte(NULL,MODULENAME,setting,FLAG_LV2ONINACTIVE|FLAG_RESET);
+ autoAwaySetting.optionFlags = db_get_b(NULL,MODULENAME,setting,FLAG_LV2ONINACTIVE|FLAG_RESET);
_snprintf(setting, sizeof(setting), "%s_AwayTime", protoName);
- autoAwaySetting.awayTime = DBGetContactSettingWord(NULL,MODULENAME,setting,SETTING_AWAYTIME_DEFAULT);
+ autoAwaySetting.awayTime = db_get_w(NULL,MODULENAME,setting,SETTING_AWAYTIME_DEFAULT);
_snprintf(setting, sizeof(setting), "%s_NATime", protoName);
- autoAwaySetting.naTime = DBGetContactSettingWord(NULL,MODULENAME,setting,SETTING_NATIME_DEFAULT);
+ autoAwaySetting.naTime = db_get_w(NULL,MODULENAME,setting,SETTING_NATIME_DEFAULT);
_snprintf(setting, sizeof(setting), "%s_StatusFlags", protoName);
- autoAwaySetting.statusFlags = DBGetContactSettingWord(NULL,MODULENAME,setting, StatusModeToProtoFlag(ID_STATUS_ONLINE)|StatusModeToProtoFlag(ID_STATUS_FREECHAT));
+ autoAwaySetting.statusFlags = db_get_w(NULL,MODULENAME,setting, StatusModeToProtoFlag(ID_STATUS_ONLINE)|StatusModeToProtoFlag(ID_STATUS_FREECHAT));
int flags;
- if (DBGetContactSettingByte(NULL, MODULENAME, SETTING_SAMESETTINGS, 0))
+ if (db_get_b(NULL, MODULENAME, SETTING_SAMESETTINGS, 0))
flags = 0xFFFFFF;
else
flags = CallProtoService(protoName, PS_GETCAPS,PFLAGNUM_2,0)&~CallProtoService(protoName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0);
_snprintf(setting, sizeof(setting), "%s_Lv1Status", protoName);
- autoAwaySetting.lv1Status = DBGetContactSettingWord(NULL, MODULENAME, setting, (flags&StatusModeToProtoFlag(ID_STATUS_AWAY))?ID_STATUS_AWAY:ID_STATUS_OFFLINE);
+ autoAwaySetting.lv1Status = db_get_w(NULL, MODULENAME, setting, (flags&StatusModeToProtoFlag(ID_STATUS_AWAY))?ID_STATUS_AWAY:ID_STATUS_OFFLINE);
_snprintf(setting, sizeof(setting), "%s_Lv2Status", protoName);
- autoAwaySetting.lv2Status = DBGetContactSettingWord(NULL, MODULENAME, setting, (flags&StatusModeToProtoFlag(ID_STATUS_NA))?ID_STATUS_NA:ID_STATUS_OFFLINE);
+ autoAwaySetting.lv2Status = db_get_w(NULL, MODULENAME, setting, (flags&StatusModeToProtoFlag(ID_STATUS_NA))?ID_STATUS_NA:ID_STATUS_OFFLINE);
return 0;
}
@@ -273,11 +273,11 @@ static int changeState(TAAAProtoSetting& setting, STATES newState) setting.szMsg = NULL;
}
- if (DBGetContactSettingByte(NULL, MODULENAME, StatusModeToDbSetting(setting.status, SETTING_MSGCUSTOM), FALSE)) {
+ if (db_get_b(NULL, MODULENAME, StatusModeToDbSetting(setting.status, SETTING_MSGCUSTOM), FALSE)) {
DBVARIANT dbv;
- if (!DBGetContactSettingTString(NULL, MODULENAME, StatusModeToDbSetting(setting.status, SETTING_STATUSMSG), &dbv)) {
+ if (!db_get_ts(NULL, MODULENAME, StatusModeToDbSetting(setting.status, SETTING_STATUSMSG), &dbv)) {
setting.szMsg = _tcsdup(dbv.ptszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
} }
}
else if (setting.szMsg != NULL) {
@@ -416,7 +416,7 @@ static VOID CALLBACK AutoAwayTimer(HWND hwnd,UINT message,UINT_PTR idEvent,DWORD }
if (confirm)
- confirmDialog = (HWND)CallService(MS_CS_SHOWCONFIRMDLGEX, (WPARAM)&ps, DBGetContactSettingWord(NULL, MODULENAME, SETTING_CONFIRMDELAY, 5));
+ confirmDialog = (HWND)CallService(MS_CS_SHOWCONFIRMDLGEX, (WPARAM)&ps, db_get_w(NULL, MODULENAME, SETTING_CONFIRMDELAY, 5));
else if (statusChanged)
CallService(MS_CS_SETSTATUSEX, (WPARAM)&ps, 0);
} }
@@ -602,7 +602,7 @@ int CSModuleLoaded(WPARAM wParam, LPARAM lParam) openInputDesktop = ( pfnOpenInputDesktop )GetProcAddress (hUser32, "OpenInputDesktop");
closeDesktop = ( pfnCloseDesktop )GetProcAddress (hUser32, "CloseDesktop");
- if ( IsWinVer2000Plus() && !DBGetContactSettingByte(NULL, MODULENAME, SETTING_IGNLOCK, FALSE))
+ if ( IsWinVer2000Plus() && !db_get_b(NULL, MODULENAME, SETTING_IGNLOCK, FALSE))
MyGetLastInputInfo = (BOOL (WINAPI *)(PLASTINPUTINFO))GetProcAddress(GetModuleHandleA("user32"),"GetLastInputInfo");
else
MyGetLastInputInfo = NULL;
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp index 4075dde869..1e154d7bca 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp @@ -60,14 +60,14 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L settings[count]->status = statusModeList[i];
DBVARIANT dbv;
- if ( !DBGetContactSetting(NULL, MODULENAME, StatusModeToDbSetting(statusModeList[i],SETTING_STATUSMSG), &dbv)) {
+ if ( !db_get(NULL, MODULENAME, StatusModeToDbSetting(statusModeList[i],SETTING_STATUSMSG), &dbv)) {
settings[count]->msg = ( char* )malloc(strlen(dbv.pszVal) + 1);
strcpy(settings[count]->msg, dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
else settings[count]->msg = NULL;
- settings[count]->useCustom = DBGetContactSettingByte(NULL, MODULENAME, StatusModeToDbSetting(statusModeList[i], SETTING_MSGCUSTOM), FALSE);
+ settings[count]->useCustom = db_get_b(NULL, MODULENAME, StatusModeToDbSetting(statusModeList[i], SETTING_MSGCUSTOM), FALSE);
count += 1;
}
SendDlgItemMessage(hwndDlg,IDC_STATUS,CB_SETCURSEL,0,0);
@@ -142,9 +142,9 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L case PSN_APPLY:
SendMessage(hwndDlg,WM_COMMAND,MAKEWPARAM(IDC_STATUS,CBN_SELCHANGE),0);
for ( i=0; i < count; i++ ) {
- DBWriteContactSettingByte(NULL, MODULENAME, StatusModeToDbSetting(settings[i]->status,SETTING_MSGCUSTOM), (BYTE)settings[i]->useCustom);
+ db_set_b(NULL, MODULENAME, StatusModeToDbSetting(settings[i]->status,SETTING_MSGCUSTOM), (BYTE)settings[i]->useCustom);
if ( (settings[i]->useCustom) && (settings[i]->msg != NULL) && (strlen(settings[i]->msg) > 0))
- DBWriteContactSettingString(NULL, MODULENAME, StatusModeToDbSetting(settings[i]->status,SETTING_STATUSMSG), settings[i]->msg);
+ db_set_s(NULL, MODULENAME, StatusModeToDbSetting(settings[i]->status,SETTING_STATUSMSG), settings[i]->msg);
}
break;
}
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp index edfeb0aaa8..f1286139ec 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp @@ -44,17 +44,17 @@ static int WriteAutoAwaySetting(TAAAProtoSetting& autoAwaySetting, char* protoNa {
char setting[128];
mir_snprintf(setting, sizeof(setting), "%s_OptionFlags", protoName);
- DBWriteContactSettingByte(NULL,MODULENAME,setting,(BYTE)autoAwaySetting.optionFlags);
+ db_set_b(NULL,MODULENAME,setting,(BYTE)autoAwaySetting.optionFlags);
mir_snprintf(setting, sizeof(setting), "%s_AwayTime", protoName);
- DBWriteContactSettingWord(NULL,MODULENAME,setting,(WORD)autoAwaySetting.awayTime);
+ db_set_w(NULL,MODULENAME,setting,(WORD)autoAwaySetting.awayTime);
mir_snprintf(setting, sizeof(setting), "%s_NATime", protoName);
- DBWriteContactSettingWord(NULL,MODULENAME,setting,(WORD)autoAwaySetting.naTime);
+ db_set_w(NULL,MODULENAME,setting,(WORD)autoAwaySetting.naTime);
mir_snprintf(setting, sizeof(setting), "%s_StatusFlags", protoName);
- DBWriteContactSettingWord(NULL,MODULENAME,setting,(WORD)autoAwaySetting.statusFlags);
+ db_set_w(NULL,MODULENAME,setting,(WORD)autoAwaySetting.statusFlags);
mir_snprintf(setting, sizeof(setting), "%s_Lv1Status", protoName);
- DBWriteContactSettingWord(NULL,MODULENAME,setting,(WORD)autoAwaySetting.lv1Status);
+ db_set_w(NULL,MODULENAME,setting,(WORD)autoAwaySetting.lv1Status);
mir_snprintf(setting, sizeof(setting), "%s_Lv2Status", protoName);
- DBWriteContactSettingWord(NULL,MODULENAME,setting,(WORD)autoAwaySetting.lv2Status);
+ db_set_w(NULL,MODULENAME,setting,(WORD)autoAwaySetting.lv2Status);
return 0;
}
@@ -84,7 +84,7 @@ static void SetDialogItems(HWND hwndDlg, TAAAProtoSetting* setting) EnableWindow(GetDlgItem(hwndDlg,IDC_SETNASTR),IsDlgButtonChecked(hwndDlg,IDC_SETNA)&&IsDlgButtonChecked(hwndDlg,IDC_TIMED));
EnableWindow(GetDlgItem(hwndDlg,IDC_SETNASTR),IsDlgButtonChecked(hwndDlg,IDC_SETNA)&&IsDlgButtonChecked(hwndDlg,IDC_TIMED));
EnableWindow(GetDlgItem(hwndDlg,IDC_LV2STATUS),IsDlgButtonChecked(hwndDlg,IDC_SETNA)&&IsDlgButtonChecked(hwndDlg,IDC_TIMED));
- EnableWindow(GetDlgItem(hwndDlg,IDC_PROTOCOL), !bSettingSame);//DBGetContactSettingByte(NULL, MODULENAME, SETTING_SAMESETTINGS, FALSE));
+ EnableWindow(GetDlgItem(hwndDlg,IDC_PROTOCOL), !bSettingSame);//db_get_b(NULL, MODULENAME, SETTING_SAMESETTINGS, FALSE));
}
static TAAAProtoSetting* GetSetting(HWND hwndDlg, TAAAProtoSetting* sameSetting)
@@ -375,19 +375,19 @@ static INT_PTR CALLBACK DlgProcAutoAwayGeneralOpts(HWND hwndDlg, UINT msg, WPARA switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_IGNLOCK, DBGetContactSettingByte(NULL, MODULENAME, SETTING_IGNLOCK, FALSE)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_IGNSYSKEYS, DBGetContactSettingByte(NULL, MODULENAME, SETTING_IGNSYSKEYS, FALSE)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_IGNALTCOMBO, DBGetContactSettingByte(NULL, MODULENAME, SETTING_IGNALTCOMBO, FALSE)?BST_CHECKED:BST_UNCHECKED);
- SetDlgItemInt(hwndDlg, IDC_AWAYCHECKTIMEINSECS, DBGetContactSettingWord(NULL, MODULENAME, SETTING_AWAYCHECKTIMEINSECS, 5), FALSE);
- SetDlgItemInt(hwndDlg, IDC_CONFIRMDELAY, DBGetContactSettingWord(NULL, MODULENAME, SETTING_CONFIRMDELAY, 5), FALSE);
+ CheckDlgButton(hwndDlg, IDC_IGNLOCK, db_get_b(NULL, MODULENAME, SETTING_IGNLOCK, FALSE)?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_IGNSYSKEYS, db_get_b(NULL, MODULENAME, SETTING_IGNSYSKEYS, FALSE)?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_IGNALTCOMBO, db_get_b(NULL, MODULENAME, SETTING_IGNALTCOMBO, FALSE)?BST_CHECKED:BST_UNCHECKED);
+ SetDlgItemInt(hwndDlg, IDC_AWAYCHECKTIMEINSECS, db_get_w(NULL, MODULENAME, SETTING_AWAYCHECKTIMEINSECS, 5), FALSE);
+ SetDlgItemInt(hwndDlg, IDC_CONFIRMDELAY, db_get_w(NULL, MODULENAME, SETTING_CONFIRMDELAY, 5), FALSE);
CheckDlgButton(hwndDlg, bSettingSame?IDC_SAMESETTINGS:IDC_PERPROTOCOLSETTINGS, BST_CHECKED);
- CheckDlgButton(hwndDlg, IDC_MONITORMOUSE, DBGetContactSettingByte(NULL, MODULENAME, SETTING_MONITORMOUSE, TRUE)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MONITORKEYBOARD, DBGetContactSettingByte(NULL, MODULENAME, SETTING_MONITORKEYBOARD, TRUE)?BST_CHECKED:BST_UNCHECKED);
- ShowWindow(GetDlgItem(hwndDlg, IDC_IDLEWARNING), (DBGetContactSettingByte(NULL, "Idle", "AAEnable", 0)));
+ CheckDlgButton(hwndDlg, IDC_MONITORMOUSE, db_get_b(NULL, MODULENAME, SETTING_MONITORMOUSE, TRUE)?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_MONITORKEYBOARD, db_get_b(NULL, MODULENAME, SETTING_MONITORKEYBOARD, TRUE)?BST_CHECKED:BST_UNCHECKED);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_IDLEWARNING), (db_get_b(NULL, "Idle", "AAEnable", 0)));
break;
case WM_SHOWWINDOW:
- ShowWindow(GetDlgItem(hwndDlg, IDC_IDLEWARNING), (DBGetContactSettingByte(NULL, "Idle", "AAEnable", 0)));
+ ShowWindow(GetDlgItem(hwndDlg, IDC_IDLEWARNING), (db_get_b(NULL, "Idle", "AAEnable", 0)));
break;
case WM_COMMAND:
@@ -412,14 +412,14 @@ static INT_PTR CALLBACK DlgProcAutoAwayGeneralOpts(HWND hwndDlg, UINT msg, WPARA case WM_NOTIFY:
if (((LPNMHDR)lParam)->code == PSN_APPLY ) {
- DBWriteContactSettingByte(NULL, MODULENAME, SETTING_IGNLOCK, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IGNLOCK));
- DBWriteContactSettingByte(NULL, MODULENAME, SETTING_IGNSYSKEYS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IGNSYSKEYS));
- DBWriteContactSettingByte(NULL, MODULENAME, SETTING_IGNALTCOMBO, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IGNALTCOMBO));
- DBWriteContactSettingByte(NULL, MODULENAME, SETTING_SAMESETTINGS, (BYTE)bSettingSame);
- DBWriteContactSettingWord(NULL, MODULENAME, SETTING_AWAYCHECKTIMEINSECS, (WORD)GetDlgItemInt(hwndDlg, IDC_AWAYCHECKTIMEINSECS, NULL, FALSE));
- DBWriteContactSettingWord(NULL, MODULENAME, SETTING_CONFIRMDELAY, (WORD)GetDlgItemInt(hwndDlg, IDC_CONFIRMDELAY, NULL, FALSE));
- DBWriteContactSettingByte(NULL, MODULENAME, SETTING_MONITORMOUSE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MONITORMOUSE));
- DBWriteContactSettingByte(NULL, MODULENAME, SETTING_MONITORKEYBOARD, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MONITORKEYBOARD));
+ db_set_b(NULL, MODULENAME, SETTING_IGNLOCK, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IGNLOCK));
+ db_set_b(NULL, MODULENAME, SETTING_IGNSYSKEYS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IGNSYSKEYS));
+ db_set_b(NULL, MODULENAME, SETTING_IGNALTCOMBO, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IGNALTCOMBO));
+ db_set_b(NULL, MODULENAME, SETTING_SAMESETTINGS, (BYTE)bSettingSame);
+ db_set_w(NULL, MODULENAME, SETTING_AWAYCHECKTIMEINSECS, (WORD)GetDlgItemInt(hwndDlg, IDC_AWAYCHECKTIMEINSECS, NULL, FALSE));
+ db_set_w(NULL, MODULENAME, SETTING_CONFIRMDELAY, (WORD)GetDlgItemInt(hwndDlg, IDC_CONFIRMDELAY, NULL, FALSE));
+ db_set_b(NULL, MODULENAME, SETTING_MONITORMOUSE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MONITORMOUSE));
+ db_set_b(NULL, MODULENAME, SETTING_MONITORKEYBOARD, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MONITORKEYBOARD));
LoadOptions(*autoAwaySettings, FALSE);
}
break;
@@ -441,7 +441,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayTabs(HWND hwndDlg, UINT msg, WPARAM wPara RECT rcTabs, rcOptions, rcPage;
TranslateDialogDefault(hwndDlg);
- bSettingSame = DBGetContactSettingByte(NULL, MODULENAME, SETTING_SAMESETTINGS, FALSE);
+ bSettingSame = db_get_b(NULL, MODULENAME, SETTING_SAMESETTINGS, FALSE);
// set tabs
tabCount = 0;
hTab = GetDlgItem(hwndDlg, IDC_TABS);
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp b/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp index edecc8f947..47740ac56a 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp @@ -52,14 +52,14 @@ static int AAAStateChanged(WPARAM wParam, LPARAM lParam) { char setting[128];
char *szProto;
- szProto = DBGetContactSettingByte(NULL, MODULENAME, SETTING_SAMESETTINGS, 0)?SETTING_ALL:aas->protocolSetting->szName;
+ szProto = db_get_b(NULL, MODULENAME, SETTING_SAMESETTINGS, 0)?SETTING_ALL:aas->protocolSetting->szName;
_snprintf(setting, sizeof(setting), "%s_Lv1Status", szProto);
- if ( (aas->protocolSetting->lastStatus == DBGetContactSettingWord(NULL, MODULENAME, setting, ID_STATUS_AWAY)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0)) {
+ if ( (aas->protocolSetting->lastStatus == db_get_w(NULL, MODULENAME, setting, ID_STATUS_AWAY)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0)) {
bReport = TRUE;
}
_snprintf(setting, sizeof(setting), "%s_Lv2Status", szProto);
- if ( (aas->protocolSetting->lastStatus == DBGetContactSettingWord(NULL, MODULENAME, setting, ID_STATUS_NA)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0)) {
+ if ( (aas->protocolSetting->lastStatus == db_get_w(NULL, MODULENAME, setting, ID_STATUS_NA)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0)) {
bReport = TRUE;
}
}
|