summaryrefslogtreecommitdiff
path: root/plugins/YAMN/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-28 14:29:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-28 14:29:31 +0300
commita905c9c3f92fd54f37a5466649ac378db69e7cb0 (patch)
tree87a60dadfbf9fd8d916ea9100c26b6e314293242 /plugins/YAMN/src/main.cpp
parentd75fed3bfc9c252f5d20b889e0bec95fb0a4527e (diff)
all protocols rewritten to CMPluginBase
Diffstat (limited to 'plugins/YAMN/src/main.cpp')
-rw-r--r--plugins/YAMN/src/main.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp
index 8c3b95350a..1e5a26ecb9 100644
--- a/plugins/YAMN/src/main.cpp
+++ b/plugins/YAMN/src/main.cpp
@@ -265,12 +265,6 @@ extern "C" int __declspec(dllexport) Load(void)
}
}
- // Registering YAMN as protocol
- PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
- pd.szName = YAMN_DBMODULE;
- pd.type = PROTOTYPE_VIRTUAL;
- Proto_RegisterModule(&pd);
-
if (nullptr == (NoWriterEV = CreateEvent(nullptr, TRUE, TRUE, nullptr)))
return 1;
if (nullptr == (WriteToFileEV = CreateEvent(nullptr, FALSE, FALSE, nullptr)))
@@ -365,3 +359,15 @@ extern "C" int __declspec(dllexport) Unload(void)
delete[] CodePageNamesSupp;
return 0;
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+struct CMPlugin : public CMPluginBase
+{
+ CMPlugin() :
+ CMPluginBase(YAMN_DBMODULE)
+ {
+ RegisterProtocol(PROTOTYPE_VIRTUAL);
+ }
+}
+ g_plugin;