summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Discord/src/main.cpp')
-rw-r--r--protocols/Discord/src/main.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/Discord/src/main.cpp b/protocols/Discord/src/main.cpp
index 98f0b120de..17a10bf78e 100644
--- a/protocols/Discord/src/main.cpp
+++ b/protocols/Discord/src/main.cpp
@@ -56,12 +56,20 @@ IconItem g_iconList[] =
{ LPGEN("Call ended"), "voiceend", IDI_VOICE_ENDED }
};
-static int OnModulesLoaded(WPARAM, LPARAM)
+static int OnModuleLoaded(WPARAM, LPARAM)
{
g_plugin.bVoiceService = ServiceExists(MS_VOICESERVICE_REGISTER);
return 0;
}
+static int OnModulesLoaded(WPARAM, LPARAM)
+{
+ HookEvent(ME_SYSTEM_MODULELOAD, &OnModuleLoaded);
+ HookEvent(ME_SYSTEM_MODULEUNLOAD, &OnModuleLoaded);
+ OnModuleLoaded(0, 0);
+ return 0;
+}
+
int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, &OnModulesLoaded);