diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-26 23:54:15 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-26 23:54:15 +0300 |
commit | 228008cd0ceeeec457d83370854510cd8be1d8f8 (patch) | |
tree | d2f5ff1794a9dece9aeb140328cb5f399b164718 /plugins/SimpleStatusMsg/src | |
parent | 3d09c00a388cfa1e832117c1dbd7fac6a3f436cd (diff) |
some hardcoded ICQ constants removed
Diffstat (limited to 'plugins/SimpleStatusMsg/src')
-rw-r--r-- | plugins/SimpleStatusMsg/src/main.cpp | 45 | ||||
-rw-r--r-- | plugins/SimpleStatusMsg/src/stdafx.h | 7 |
2 files changed, 0 insertions, 52 deletions
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index aac8d8d7bf..a72084c738 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -1463,48 +1463,6 @@ static wchar_t* ParseDate(ARGUMENTSINFO *ai) return mir_wstrdup(szStr);
}
-int ICQMsgTypeToStatus(int iMsgType)
-{
- switch (iMsgType) {
- case MTYPE_AUTOONLINE: return ID_STATUS_ONLINE;
- case MTYPE_AUTOAWAY: return ID_STATUS_AWAY;
- case MTYPE_AUTOBUSY: return ID_STATUS_OCCUPIED;
- case MTYPE_AUTONA: return ID_STATUS_NA;
- case MTYPE_AUTODND: return ID_STATUS_DND;
- case MTYPE_AUTOFFC: return ID_STATUS_FREECHAT;
- default: return ID_STATUS_OFFLINE;
- }
-}
-
-static int OnICQStatusMsgRequest(WPARAM wParam, LPARAM lParam, LPARAM lMirParam)
-{
-#ifdef _DEBUG
- g_plugin.debugLogA("OnICQStatusMsgRequest(): UIN: %d on %s", (int)lParam, (char *)lMirParam);
-#endif
-
- if (g_plugin.getByte("NoUpdateOnICQReq", 1))
- return 0;
-
- char *szProto = (char *)lMirParam;
- MCONTACT hContact = 0;
-
- for (auto &cc : Contacts()) {
- if (db_get_dw(cc, szProto, "UIN", 0) == (DWORD)lParam) {
- hContact = cc;
- break;
- }
- }
- if (!hContact)
- return 0;
-
- int iStatus = ICQMsgTypeToStatus(wParam);
- wchar_t *tszMsg = GetAwayMessage(iStatus, szProto, TRUE, hContact);
- Proto_SetAwayMsgT(szProto, iStatus, tszMsg);
- mir_free(tszMsg);
-
- return 0;
-}
-
static int OnAccListChanged(WPARAM, LPARAM)
{
#ifdef _DEBUG
@@ -1522,9 +1480,6 @@ static int OnAccListChanged(WPARAM, LPARAM) if (!pa->IsEnabled())
continue;
- if (!mir_strcmp(pa->szProtoName, "ICQ"))
- HookProtoEvent(pa->szModuleName, ME_ICQ_STATUSMSGREQ, OnICQStatusMsgRequest);
-
accounts->statusFlags |= (CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) & ~CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0));
if (CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) & ~CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))
diff --git a/plugins/SimpleStatusMsg/src/stdafx.h b/plugins/SimpleStatusMsg/src/stdafx.h index 4391957015..108697be74 100644 --- a/plugins/SimpleStatusMsg/src/stdafx.h +++ b/plugins/SimpleStatusMsg/src/stdafx.h @@ -59,13 +59,6 @@ struct CMPlugin : public PLUGIN<CMPlugin> #include "resource.h"
#include "version.h"
-#define MTYPE_AUTOONLINE 0xE7 // Auto online message (internal only)
-#define MTYPE_AUTOAWAY 0xE8 // Auto away message
-#define MTYPE_AUTOBUSY 0xE9 // Auto occupied message
-#define MTYPE_AUTONA 0xEA // Auto not available message
-#define MTYPE_AUTODND 0xEB // Auto do not disturb message
-#define MTYPE_AUTOFFC 0xEC // Auto free for chat message
-
extern UINT_PTR g_uUpdateMsgTimer;
extern VOID CALLBACK UpdateMsgTimerProc(HWND, UINT, UINT_PTR, DWORD);
extern VOID APIENTRY HandlePopupMenu(HWND hwnd, POINT pt, HWND edit_control);
|