diff options
author | George Hazan <ghazan@miranda.im> | 2020-01-25 14:24:53 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-01-25 14:24:53 +0300 |
commit | 9cca190bc3022311915eb1e95b3cc3bb89aed328 (patch) | |
tree | f0e27680e6dae1a0df044ae59ad86ccac59d0db7 /plugins/KeyboardNotify/src | |
parent | cf83f17e172253faf44737b8f4c27945e9f671e5 (diff) |
massive code cleaning:
- GCHOOK structure normalized (i.e. inlined SESSION_INFO fields replaced with a reference to SESSION_INFO);
- fake CMsgDialog declaration added to m_srmm_int.h, thus duplicated declarations in plugins aren't needed anymore
- other minor changes
Diffstat (limited to 'plugins/KeyboardNotify/src')
-rw-r--r-- | plugins/KeyboardNotify/src/main.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index fcbb94a66a..d5c9e650ca 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -408,11 +408,9 @@ static int PluginMessageEventHook(WPARAM hContact, LPARAM hEvent) static int OnGcEvent(WPARAM, LPARAM lParam)
{
GCHOOK *gc = (GCHOOK *)lParam;
- if (gc->iType == GC_USER_MESSAGE && bFlashOnGC) {
- if (SESSION_INFO *si = g_chatApi.SM_FindSession(gc->ptszID, gc->pszModule))
- if (contactCheckProtocol(gc->pszModule, si->hContact, EVENTTYPE_MESSAGE) && checkNotifyOptions() && checkStatus(gc->pszModule))
- SetEvent(hFlashEvent);
- }
+ if (gc->iType == GC_USER_MESSAGE && bFlashOnGC)
+ if (contactCheckProtocol(gc->si->pszModule, gc->si->hContact, EVENTTYPE_MESSAGE) && checkNotifyOptions() && checkStatus(gc->si->pszModule))
+ SetEvent(hFlashEvent);
return 0;
}
|