diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Scriver/src/chat/window.cpp | 30 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat_main.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat_window.cpp | 33 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 2 |
4 files changed, 18 insertions, 49 deletions
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index b1f3bad9ad..9dd59362d8 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -566,7 +566,7 @@ LRESULT CALLBACK CChatRoomDlg::LogSubclassProc(HWND hwnd, UINT msg, WPARAM wPara default:
PostMessage(GetParent(hwnd), WM_MOUSEACTIVATE, 0, 0);
- pci->DoEventHookAsync(GetParent(hwnd), si->ptszID, si->pszModule, GC_USER_LOGMENU, nullptr, nullptr, uID);
+ pDlg->DoEventHook(GC_USER_LOGMENU, nullptr, nullptr, uID);
break;
}
DestroyGCMenu(&hMenu, 5);
@@ -678,11 +678,11 @@ LRESULT CALLBACK CChatRoomDlg::NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM break;
case ID_MESS:
- pci->DoEventHookAsync(GetParent(hwnd), pDlg->m_si->ptszID, pDlg->m_si->pszModule, GC_USER_PRIVMESS, ui, nullptr, 0);
+ pDlg->DoEventHook(GC_USER_PRIVMESS, ui, nullptr, 0);
break;
default:
- pci->DoEventHookAsync(GetParent(hwnd), pDlg->m_si->ptszID, pDlg->m_si->pszModule, GC_USER_NICKLISTMENU, ui, nullptr, uID);
+ pDlg->DoEventHook(GC_USER_NICKLISTMENU, ui, nullptr, uID);
break;
}
DestroyGCMenu(&hMenu, 1);
@@ -710,7 +710,7 @@ LRESULT CALLBACK CChatRoomDlg::NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM int index = SendMessage(hwnd, LB_GETCURSEL, 0, 0);
if (index != LB_ERR) {
USERINFO *ui = pci->SM_GetUserFromIndex(pDlg->m_si->ptszID, pDlg->m_si->pszModule, index);
- pci->DoEventHookAsync(GetParent(hwnd), pDlg->m_si->ptszID, pDlg->m_si->pszModule, GC_USER_PRIVMESS, ui, nullptr, 0);
+ pDlg->DoEventHook(GC_USER_PRIVMESS, ui, nullptr, 0);
}
break;
}
@@ -1037,7 +1037,7 @@ void CChatRoomDlg::onDblClick_List(CCtrlListBox*) m_message.SendMsg(EM_REPLACESEL, FALSE, (LPARAM)pszName);
PostMessage(m_hwnd, WM_MOUSEACTIVATE, 0, 0);
}
- else pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_PRIVMESS, ui, nullptr, 0);
+ else DoEventHook(GC_USER_PRIVMESS, ui, nullptr, 0);
}
}
@@ -1076,7 +1076,7 @@ void CChatRoomDlg::onClick_Ok(CCtrlButton *pButton) EnableWindow(m_btnOk.GetHwnd(), FALSE);
- pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_MESSAGE, nullptr, ptszText, 0);
+ DoEventHook(GC_USER_MESSAGE, nullptr, ptszText, 0);
SetFocus(m_message.GetHwnd());
}
@@ -1093,7 +1093,7 @@ void CChatRoomDlg::onClick_History(CCtrlButton *pButton) void CChatRoomDlg::onClick_ChanMgr(CCtrlButton *pButton)
{
if (pButton->Enabled())
- pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_CHANMGR, nullptr, nullptr, 0);
+ DoEventHook(GC_USER_CHANMGR, nullptr, nullptr, 0);
}
void CChatRoomDlg::onClick_ShowList(CCtrlButton *pButton)
@@ -1593,22 +1593,6 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) }
break;
- case GC_FIREHOOK:
- if (lParam) {
- NotifyEventHooks(pci->hSendEvent, 0, lParam);
- GCHOOK *gch = (GCHOOK*)lParam;
- if (gch->pDest) {
- mir_free((void*)gch->pDest->ptszID);
- mir_free((void*)gch->pDest->pszModule);
- mir_free(gch->pDest);
- }
- mir_free(gch->ptszText);
- mir_free(gch->ptszUID);
- mir_free(gch->ptszNick);
- mir_free(gch);
- }
- break;
-
case GC_CHANGEFILTERFLAG:
m_iLogFilterFlags = lParam;
break;
diff --git a/plugins/TabSRMM/src/chat_main.cpp b/plugins/TabSRMM/src/chat_main.cpp index ab6fe6b62f..945ca7e475 100644 --- a/plugins/TabSRMM/src/chat_main.cpp +++ b/plugins/TabSRMM/src/chat_main.cpp @@ -37,7 +37,7 @@ pfnDoTrayIcon oldDoTrayIcon; CHAT_MANAGER *pci;
TMUCSettings g_Settings;
-static void OnCreateSession(SESSION_INFO *si, MODULEINFO *mi)
+static void OnCreateSession(SESSION_INFO*, MODULEINFO *mi)
{
if (mi) {
mi->idleTimeStamp = time(0);
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp index 8e588f8c2f..3869504ee2 100644 --- a/plugins/TabSRMM/src/chat_window.cpp +++ b/plugins/TabSRMM/src/chat_window.cpp @@ -1449,7 +1449,7 @@ LRESULT CALLBACK CChatRoomDlg::NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM break; case ID_MESS: - pci->DoEventHookAsync(GetParent(hwnd), si->ptszID, si->pszModule, GC_USER_PRIVMESS, ui, nullptr, 0); + dat->DoEventHook(GC_USER_PRIVMESS, ui, nullptr, 0); break; default: @@ -1463,7 +1463,7 @@ LRESULT CALLBACK CChatRoomDlg::NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM for (int i = 0; i < iSelectedItems; i++) { USERINFO *ui1 = pci->SM_GetUserFromIndex(si->ptszID, si->pszModule, pItems[i]); if (ui1) - pci->DoEventHookAsync(hwndParent, si->ptszID, si->pszModule, GC_USER_NICKLISTMENU, ui1, nullptr, (LPARAM)uID); + dat->DoEventHook(GC_USER_NICKLISTMENU, ui1, nullptr, uID); } } mir_free(pItems); @@ -1751,7 +1751,7 @@ void CChatRoomDlg::OnClick_OK(CCtrlButton*) bool fSound = true; if (ptszText[0] == '/' || m_si->iType == GCW_SERVER) fSound = false; - pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_MESSAGE, nullptr, ptszText, 0); + DoEventHook(GC_USER_MESSAGE, nullptr, ptszText, 0); mi->idleTimeStamp = time(0); mi->lastIdleCheck = 0; pci->SM_BroadcastMessage(m_si->pszModule, GC_UPDATESTATUSBAR, 0, 1, TRUE); @@ -1819,7 +1819,7 @@ void CChatRoomDlg::OnClick_ShowNickList(CCtrlButton *pButton) void CChatRoomDlg::OnClick_ChanMgr(CCtrlButton *pButton) { if (pButton->Enabled()) - pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_CHANMGR, nullptr, nullptr, 0); + DoEventHook(GC_USER_CHANMGR, nullptr, nullptr, 0); } void CChatRoomDlg::OnClick_BIU(CCtrlButton *pButton) @@ -1943,7 +1943,7 @@ void CChatRoomDlg::OnDblClick_List(CCtrlListBox*) PostMessage(m_hwnd, WM_MOUSEACTIVATE, 0, 0); SetFocus(m_message.GetHwnd()); } - else pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_PRIVMESS, ui, nullptr, 0); + else DoEventHook(GC_USER_PRIVMESS, ui, nullptr, 0); } INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) @@ -2454,21 +2454,6 @@ LABEL_SHOWWINDOW: } break; - case GC_FIREHOOK: - if (lParam) { - GCHOOK *gch = (GCHOOK*)lParam; - NotifyEventHooks(pci->hSendEvent, 0, (WPARAM)gch); - if (gch->pDest) { - mir_free((void*)gch->pDest->ptszID); - mir_free((void*)gch->pDest->pszModule); - mir_free(gch->pDest); - } - mir_free(gch->ptszText); - mir_free(gch->ptszUID); - mir_free(gch); - } - break; - case GC_CHANGEFILTERFLAG: if (m_iLogFilterFlags == 0 && m_bFilterEnabled) SendMessage(m_hwnd, WM_COMMAND, IDC_FILTER, 0); @@ -2584,7 +2569,7 @@ LABEL_SHOWWINDOW: return _dlgReturn(m_hwnd, 1); case TABSRMM_HK_MUC_SHOWSERVER: if (m_si->iType != GCW_SERVER) - pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_MESSAGE, nullptr, L"/servershow", 0); + DoEventHook(GC_USER_MESSAGE, nullptr, L"/servershow", 0); return _dlgReturn(m_hwnd, 1); } } @@ -2677,7 +2662,7 @@ LABEL_SHOWWINDOW: default: PostMessage(m_hwnd, WM_MOUSEACTIVATE, 0, 0); - pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_LOGMENU, nullptr, nullptr, (LPARAM)uID); + DoEventHook(GC_USER_LOGMENU, nullptr, nullptr, (LPARAM)uID); break; } @@ -2732,11 +2717,11 @@ LABEL_SHOWWINDOW: break; case ID_MESS: - pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_PRIVMESS, ui, nullptr, 0); + DoEventHook(GC_USER_PRIVMESS, ui, nullptr, 0); break; default: - pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_NICKLISTMENU, ui, nullptr, (LPARAM)uID); + DoEventHook(GC_USER_NICKLISTMENU, ui, nullptr, (LPARAM)uID); break; } DestroyGCMenu(&hMenu, 1); diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index e2e8960a26..879b9bd1eb 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -354,7 +354,7 @@ public: public:
CTabBaseDlg(int iDialogId, SESSION_INFO* = nullptr);
- virtual ~CTabBaseDlg() override;
+ virtual ~CTabBaseDlg();
virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
|