summaryrefslogtreecommitdiff
path: root/protocols/ICQCorp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-12 21:44:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-12 21:44:56 +0300
commit53fe3e46177d17b4941610de19f5cc6210700cb4 (patch)
treeb67a6bc208dad141f9db14035cd7e42ff2a51872 /protocols/ICQCorp
parent488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff)
db_* functions replaced with g_plugin calls
Diffstat (limited to 'protocols/ICQCorp')
-rw-r--r--protocols/ICQCorp/src/options.cpp16
-rw-r--r--protocols/ICQCorp/src/protocol.cpp12
2 files changed, 14 insertions, 14 deletions
diff --git a/protocols/ICQCorp/src/options.cpp b/protocols/ICQCorp/src/options.cpp
index 2b0e9f1b2c..fb0fd8af76 100644
--- a/protocols/ICQCorp/src/options.cpp
+++ b/protocols/ICQCorp/src/options.cpp
@@ -29,28 +29,28 @@ static INT_PTR CALLBACK icqOptionsDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hWnd);
- SetDlgItemInt(hWnd, IDC_OPT_UIN, db_get_dw(NULL, protoName, "UIN", 0), FALSE);
- if (!db_get_s(NULL, protoName, "Password", &dbv)) {
+ SetDlgItemInt(hWnd, IDC_OPT_UIN, db_get_dw(0, protoName, "UIN", 0), FALSE);
+ if (!db_get_s(0, protoName, "Password", &dbv)) {
SetDlgItemTextA(hWnd, IDC_OPT_PASSWORD, dbv.pszVal);
db_free(&dbv);
}
- if (!db_get_s(NULL, protoName, "Server", &dbv)) {
+ if (!db_get_s(0, protoName, "Server", &dbv)) {
SetDlgItemTextA(hWnd, IDC_OPT_SERVER, dbv.pszVal);
db_free(&dbv);
}
- SetDlgItemInt(hWnd, IDC_OPT_PORT, db_get_w(NULL, protoName, "Port", 4000), FALSE);
+ SetDlgItemInt(hWnd, IDC_OPT_PORT, db_get_w(0, protoName, "Port", 4000), FALSE);
ShowWindow(GetDlgItem(hWnd, IDC_OPT_RECONNECT), SW_HIDE);
return TRUE;
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- db_set_dw(NULL, protoName, "UIN", (DWORD)GetDlgItemInt(hWnd, IDC_OPT_UIN, nullptr, FALSE));
+ db_set_dw(0, protoName, "UIN", (DWORD)GetDlgItemInt(hWnd, IDC_OPT_UIN, nullptr, FALSE));
GetDlgItemTextA(hWnd, IDC_OPT_PASSWORD, str, sizeof(str));
- db_set_s(NULL, protoName, "Password", str);
+ db_set_s(0, protoName, "Password", str);
GetDlgItemTextA(hWnd, IDC_OPT_SERVER, str, sizeof(str));
- db_set_s(NULL, protoName, "Server", str);
- db_set_w(NULL, protoName, "Port", (WORD)GetDlgItemInt(hWnd, IDC_OPT_PORT, nullptr, FALSE));
+ db_set_s(0, protoName, "Server", str);
+ db_set_w(0, protoName, "Port", (WORD)GetDlgItemInt(hWnd, IDC_OPT_PORT, nullptr, FALSE));
return TRUE;
}
break;
diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp
index 6fa78b0e1a..b1e1f02d20 100644
--- a/protocols/ICQCorp/src/protocol.cpp
+++ b/protocols/ICQCorp/src/protocol.cpp
@@ -195,7 +195,7 @@ bool ICQ::logon(unsigned short logonStatus)
DBVARIANT dbv;
char str[128];
- if (!db_get_s(NULL, protoName, "Server", &dbv)) {
+ if (!db_get_s(0, protoName, "Server", &dbv)) {
lstrcpyA(str, dbv.pszVal);
db_free(&dbv);
}
@@ -208,7 +208,7 @@ bool ICQ::logon(unsigned short logonStatus)
return false;
if (!udpSocket.connected()) {
- if (!udpSocket.setDestination(str, db_get_w(NULL, protoName, "Port", 4000)))
+ if (!udpSocket.setDestination(str, db_get_w(0, protoName, "Port", 4000)))
return false;
udpSocket.openConnection();
}
@@ -218,8 +218,8 @@ bool ICQ::logon(unsigned short logonStatus)
updateContactList();
- dwUIN = db_get_dw(NULL, protoName, "UIN", 0);
- if (!db_get_s(NULL, protoName, "Password", &dbv)) {
+ dwUIN = db_get_dw(0, protoName, "UIN", 0);
+ if (!db_get_s(0, protoName, "Password", &dbv)) {
lstrcpyA(str, dbv.pszVal);
db_free(&dbv);
}
@@ -763,7 +763,7 @@ unsigned short ICQ::processUdpPacket(Packet &packet)
>> timedataStamp
>> newCommand;
- db_set_dw(NULL, protoName, "LastBroadcastTime", timedataStamp);
+ db_set_dw(0, protoName, "LastBroadcastTime", timedataStamp);
timedataStamp = TimeZone_ToLocal(timedataStamp);
processSystemMessage(packet, checkUin, newCommand, timedataStamp);
@@ -1061,7 +1061,7 @@ void ICQ::requestSystemMsg()
void ICQ::requestBroadcastMsg()
{
- unsigned int timeStamp = db_get_dw(NULL, protoName, "LastBroadcastTime", 0);
+ unsigned int timeStamp = db_get_dw(0, protoName, "LastBroadcastTime", 0);
Packet packet;
packet << ICQ_VERSION