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 a5d871b162..e031b3ca4d 100644
--- a/protocols/Discord/src/main.cpp
+++ b/protocols/Discord/src/main.cpp
@@ -52,12 +52,20 @@ IconItem g_iconList[] =
{
{ LPGEN("Main icon"), "main", IDI_MAIN },
{ LPGEN("Group chats"), "groupchat", IDI_GROUPCHAT },
- { LPGEN("Call"), "voicecall", IDI_VOICE_CALL },
+ { LPGEN("Call"), "voicecall", IDI_VOICE_CALL },
{ LPGEN("Call ended"), "voiceend", IDI_VOICE_ENDED }
};
+static int OnModulesLoaded(WPARAM, LPARAM)
+{
+ g_plugin.bVoiceService = ServiceExists(MS_VOICESERVICE_REGISTER);
+ return 0;
+}
+
int CMPlugin::Load()
{
+ HookEvent(ME_SYSTEM_MODULESLOADED, &OnModulesLoaded);
+
g_plugin.registerIcon("Protocols/Discord", g_iconList);
return 0;
}