summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/mir_core.def1
-rw-r--r--src/mir_core/modules.cpp9
2 files changed, 10 insertions, 0 deletions
diff --git a/src/mir_core/mir_core.def b/src/mir_core/mir_core.def
index 66324ec1ed..0a13752fff 100644
--- a/src/mir_core/mir_core.def
+++ b/src/mir_core/mir_core.def
@@ -130,3 +130,4 @@ db_setCurrent @127
CmdLine_GetOption @128
CmdLine_Parse @129
Utf8CheckString @130
+GetSubscribersCount @131
diff --git a/src/mir_core/modules.cpp b/src/mir_core/modules.cpp
index 794af53e74..4e9a518d26 100644
--- a/src/mir_core/modules.cpp
+++ b/src/mir_core/modules.cpp
@@ -275,6 +275,15 @@ MIR_CORE_DLL(int) NotifyEventHooks(HANDLE hEvent, WPARAM wParam, LPARAM lParam)
return item->result;
}
+extern "C" MIR_CORE_DLL(int) GetSubscribersCount(THook* pHook)
+{
+ switch ( checkHook(pHook)) {
+ case hookInvalid:
+ case hookEmpty: return 0;
+ }
+ return pHook->subscriberCount;
+}
+
static HANDLE HookEventInt(int type, const char* name, MIRANDAHOOK hookProc, void* object, LPARAM lParam)
{
mir_cslock lck(csHooks);