diff options
Diffstat (limited to 'protocols/MRA/src/Mra.cpp')
-rw-r--r-- | protocols/MRA/src/Mra.cpp | 45 |
1 files changed, 16 insertions, 29 deletions
diff --git a/protocols/MRA/src/Mra.cpp b/protocols/MRA/src/Mra.cpp index d77cbb639f..efaddcfd34 100644 --- a/protocols/MRA/src/Mra.cpp +++ b/protocols/MRA/src/Mra.cpp @@ -1,5 +1,7 @@ #include "Mra.h"
+LIST<CMraProto> g_Instances(1, PtrKeySortT);
+
MRA_SETTINGS masMraSettings;
int hLangpack;
@@ -19,9 +21,6 @@ PLUGININFOEX pluginInfoEx = { void IconsLoad();
-int OnModulesLoaded(WPARAM, LPARAM);
-int OnPreShutdown(WPARAM, LPARAM);
-
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID Reserved)
{
switch (dwReason) {
@@ -48,16 +47,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda }
///////////////////////////////////////////////////////////////////////////////
-// Protocol instances
-
-static int sttCompareProtocols(const CMraProto *p1, const CMraProto *p2)
-{
- return lstrcmp(p1->m_tszUserName, p2->m_tszUserName);
-}
-
-LIST<CMraProto> g_Instances(1, sttCompareProtocols);
-
-///////////////////////////////////////////////////////////////////////////////
static CMraProto* mraProtoInit(const char* pszProtoName, const TCHAR* tszUserName)
{
@@ -73,6 +62,20 @@ static int mraProtoUninit(CMraProto *ppro) return 0;
}
+///////////////////////////////////////////////////////////////////////////////
+
+static int OnModulesLoaded(WPARAM, LPARAM)
+{
+ masMraSettings.dwGlobalPluginRunning = TRUE;
+ return 0;
+}
+
+static int OnPreShutdown(WPARAM, LPARAM)
+{
+ masMraSettings.dwGlobalPluginRunning = FALSE;
+ return 0;
+}
+
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfoEx);
@@ -117,8 +120,6 @@ extern "C" __declspec(dllexport) int Load(void) pd.fnInit = (pfnInitProto)mraProtoInit;
pd.fnUninit = (pfnUninitProto)mraProtoUninit;
CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
-
- DebugPrintCRLFW(_T("Load - DONE"));
return 0;
}
@@ -131,19 +132,5 @@ extern "C" __declspec(dllexport) int Unload(void) }
g_Instances.destroy();
- DebugPrintCRLFW(_T("Unload - DONE"));
- return 0;
-}
-
-
-static int OnModulesLoaded(WPARAM, LPARAM)
-{
- masMraSettings.dwGlobalPluginRunning = TRUE;
- return 0;
-}
-
-int OnPreShutdown(WPARAM, LPARAM)
-{
- masMraSettings.dwGlobalPluginRunning = FALSE;
return 0;
}
|