diff --git a/Release/x64/qtTsOverlay_x64.dll b/Release/x64/qtTsOverlay_x64.dll index 10d0f6a135c5cc4980e8dc1972dd5adfb8012cf5..becb1799922790ead8a05b81cbf0acf41568466b 100644 Binary files a/Release/x64/qtTsOverlay_x64.dll and b/Release/x64/qtTsOverlay_x64.dll differ diff --git a/Release/x64/qtTsOverlay_x64.exp b/Release/x64/qtTsOverlay_x64.exp index 58070291d32e7d8022110b42e513a6b04f12fd97..2dfc9f126bdd84a06a0aefd76856f04ac1ad15a6 100644 Binary files a/Release/x64/qtTsOverlay_x64.exp and b/Release/x64/qtTsOverlay_x64.exp differ diff --git a/Release/x64/qtTsOverlay_x64.lib b/Release/x64/qtTsOverlay_x64.lib index 9b75fa64b399351fc8f23193d63131ae9be7f8da..fa492bf83511d7e8b373e2d228367fbf19fa0364 100644 Binary files a/Release/x64/qtTsOverlay_x64.lib and b/Release/x64/qtTsOverlay_x64.lib differ diff --git a/plugin.cpp b/plugin.cpp index e2b59648c99d0a58ec5bb4ab9725bc922958316e..97e2c85524da55c990eadee26b8021a00dfd84c6 100644 --- a/plugin.cpp +++ b/plugin.cpp @@ -107,11 +107,14 @@ OverlayController* getController(uint64 serverConnectionHandlerID = 0) if (serverConnectionHandlerID == 0) { OverlayController* ret = NULL; + for (auto &it : g_serverList.keys()) { int tmp; + anyID ownID; + ts3Functions.getClientID(it, &ownID); - if (ts3Functions.getClientSelfVariableAsInt(it, CLIENT_IS_MUTED, &tmp) != ERROR_ok) + if (ts3Functions.getClientSelfVariableAsInt(ownID, CLIENT_IS_MUTED, &tmp) != ERROR_ok) if (tmp == 0) ret = g_serverList.find(it).value(); } @@ -775,7 +778,11 @@ void ts3plugin_onHotkeyEvent(const char* keyword) { printf("PLUGIN: Hotkey event: %s\n", keyword); if (QString(keyword) == "Channellist") - getController()->debugPrint("WUHU"); + { + auto tmp = getController(); + if (tmp != NULL) + tmp->debugPrint("WUHU"); + } } /* Called when recording a hotkey has finished after calling ts3Functions.requestHotkeyInputDialog */ diff --git a/plugin.h b/plugin.h index 70b6814aa68aab445ace59b844c8f741404dcccb..f6921380fa29472a413d0e3fdd5cb2a9cd925702 100644 --- a/plugin.h +++ b/plugin.h @@ -41,7 +41,7 @@ extern "C" { PLUGINS_EXPORTDLL void ts3plugin_freeMemory(void* data); PLUGINS_EXPORTDLL int ts3plugin_requestAutoload(); //PLUGINS_EXPORTDLL void ts3plugin_initMenus(struct PluginMenuItem*** menuItems, char** menuIcon); - //PLUGINS_EXPORTDLL void ts3plugin_initHotkeys(struct PluginHotkey*** hotkeys); + PLUGINS_EXPORTDLL void ts3plugin_initHotkeys(struct PluginHotkey*** hotkeys); /* Clientlib */ PLUGINS_EXPORTDLL void ts3plugin_onConnectStatusChangeEvent(uint64 serverConnectionHandlerID, int newStatus, unsigned int errorNumber);