diff options
Diffstat (limited to 'protocols/MRA/src/Mra.cpp')
-rw-r--r-- | protocols/MRA/src/Mra.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/MRA/src/Mra.cpp b/protocols/MRA/src/Mra.cpp index 9f609f4056..e6c6cd3843 100644 --- a/protocols/MRA/src/Mra.cpp +++ b/protocols/MRA/src/Mra.cpp @@ -23,7 +23,7 @@ HINSTANCE g_hInstance; HMODULE g_hDLLXStatusIcons;
HICON g_hMainIcon;
-bool g_bChatExist;
+bool g_bChatExist, g_bShutdown = false;
size_t g_dwMirWorkDirPathLen;
WCHAR g_szMirWorkDirPath[MAX_FILEPATH];
@@ -70,6 +70,12 @@ static int mraProtoUninit(CMraProto *ppro) ///////////////////////////////////////////////////////////////////////////////
+static int __cdecl OnPreShutdown(WPARAM, LPARAM)
+{
+ g_bShutdown = true;
+ return 0;
+}
+
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfoEx);
@@ -78,6 +84,8 @@ extern "C" __declspec(dllexport) int Load(void) IconsLoad();
InitXStatusIcons();
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown);
+
PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = "MRA";
pd.type = PROTOTYPE_PROTOCOL;
|