diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-07 20:14:21 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-07 20:14:21 +0300 |
commit | f60c78abfbd5f279b30de729046b805bba8e00b0 (patch) | |
tree | 1120bba828b2151604e98163aa7a3fe221264068 /plugins/NewXstatusNotify | |
parent | 26a653ecae7edbeefb7966e08714e152c73b78eb (diff) |
Proto_GetStatus is used everywhere instead of PS_GETSTATUS
Diffstat (limited to 'plugins/NewXstatusNotify')
-rw-r--r-- | plugins/NewXstatusNotify/src/main.cpp | 6 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/popup.cpp | 2 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/xstatus.cpp | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index edf5edcdb2..60649d6deb 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -369,7 +369,7 @@ int ContactStatusChanged(MCONTACT hContact, WORD oldStatus, WORD newStatus) bool bEnablePopup = true, bEnableSound = true;
char *szProto = GetContactProto(hContact);
- WORD myStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
+ int myStatus = Proto_GetStatus(szProto);
if (!mir_strcmp(szProto, META_PROTO)) { //this contact is Meta
MCONTACT hSubContact = db_mc_getMostOnline(hContact);
@@ -419,7 +419,7 @@ int ContactStatusChanged(MCONTACT hContact, WORD oldStatus, WORD newStatus) }
if (bEnablePopup && db_get_b(hContact, MODULE, "EnablePopups", 1) && !opt.TempDisabled) {
- WORD wStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
+ int wStatus = Proto_GetStatus(szProto);
wchar_t str[MAX_SECONDLINE] = { 0 };
if (opt.ShowStatus)
GetStatusText(hContact, newStatus, oldStatus, str);
@@ -641,7 +641,7 @@ int ProcessStatusMessage(DBCONTACTWRITESETTING *cws, MCONTACT hContact) bEnableSound = bEnablePopup = false;
// we're offline or just connecting
- WORD myStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
+ int myStatus = Proto_GetStatus(szProto);
if (myStatus == ID_STATUS_OFFLINE)
goto skip_notify;
diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp index a0062327b3..a570cd7646 100644 --- a/plugins/NewXstatusNotify/src/popup.cpp +++ b/plugins/NewXstatusNotify/src/popup.cpp @@ -188,7 +188,7 @@ LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa if (pdp != nullptr) {
char *szProto = GetContactProto(PUGetContact(hwnd));
if (szProto && opt.ReadAwayMsg && StatusHasAwayMessage(szProto, pdp->newStatus)) {
- WORD myStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
+ int myStatus = Proto_GetStatus(szProto);
if (myStatus != ID_STATUS_INVISIBLE)
QueryAwayMessage(hwnd, pdp);
}
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp index 6bcc4a7b05..4c73abb6f9 100644 --- a/plugins/NewXstatusNotify/src/xstatus.cpp +++ b/plugins/NewXstatusNotify/src/xstatus.cpp @@ -351,7 +351,7 @@ void ExtraStatusChanged(XSTATUSCHANGE *xsc) if ((db_get_b(0, MODULE, buff, 1) == 0)
|| (db_get_w(xsc->hContact, xsc->szProto, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
|| (!opt.HiddenContactsToo && (db_get_b(xsc->hContact, "CList", "Hidden", 0) == 1))
- || (CallProtoService(xsc->szProto, PS_GETSTATUS, 0, 0) == ID_STATUS_OFFLINE))
+ || (Proto_GetStatus(xsc->szProto) == ID_STATUS_OFFLINE))
{
FreeXSC(xsc);
return;
@@ -364,7 +364,7 @@ void ExtraStatusChanged(XSTATUSCHANGE *xsc) // check if our status isn't on autodisable list
if (opt.AutoDisable) {
char statusIDs[12], statusIDp[12];
- WORD myStatus = (WORD)CallProtoService(xsc->szProto, PS_GETSTATUS, 0, 0);
+ int myStatus = Proto_GetStatus(xsc->szProto);
mir_snprintf(statusIDs, "s%d", myStatus);
mir_snprintf(statusIDp, "p%d", myStatus);
bEnableSound = db_get_b(0, MODULE, statusIDs, 1) ? FALSE : bEnableSound;
|