diff options
author | George Hazan <ghazan@miranda.im> | 2019-01-17 17:37:28 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-01-17 17:37:39 +0300 |
commit | b68362e4ca9a176bde960f20dce76822e0a5dd0e (patch) | |
tree | 9985b477a54aa7d16f782f408cf74e828b8a3fed /protocols/VKontakte/src/main.cpp | |
parent | 7623a366aeedaffb50057fc7ae01ad47925bb7fd (diff) |
code cleaning
Diffstat (limited to 'protocols/VKontakte/src/main.cpp')
-rw-r--r-- | protocols/VKontakte/src/main.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/main.cpp b/protocols/VKontakte/src/main.cpp index 8e2909bfa5..c304f57adb 100644 --- a/protocols/VKontakte/src/main.cpp +++ b/protocols/VKontakte/src/main.cpp @@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "version.h"
CMPlugin g_plugin;
+bool g_bMessageState;
/////////////////////////////////////////////////////////////////////////////////////////
@@ -49,8 +50,18 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC /////////////////////////////////////////////////////////////////////////////////////////
// OnLoad - initialize the plugin instance
+static int OnModuleLoaded(WPARAM, LPARAM)
+{
+ g_bMessageState = ServiceExists(MS_MESSAGESTATE_UPDATE) != 0;
+ return 0;
+}
+
int CMPlugin::Load()
{
+ HookEvent(ME_SYSTEM_MODULELOAD, OnModuleLoaded);
+ HookEvent(ME_SYSTEM_MODULEUNLOAD, OnModuleLoaded);
+ OnModuleLoaded(0, 0);
+
InitIcons();
return 0;
}
|