summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-08 11:34:37 +0200
committerGeorge Hazan <ghazan@miranda.im>2018-05-08 11:37:59 +0200
commitc575dc94be9630240b7377a2e05011630bb8eb1e (patch)
tree442344d1df3240e89c69972576c6635468ed425e
parentb6bbbb16e26ce924022d623572fce852e234ee16 (diff)
Dummy: added stubs for deprecated protocols
(cherry picked from commit 2d0241cce00df9e38404009b1a4179d7b2b8af3c)
-rw-r--r--protocols/Dummy/src/dummy_proto.cpp4
-rw-r--r--protocols/Dummy/src/main.cpp48
2 files changed, 50 insertions, 2 deletions
diff --git a/protocols/Dummy/src/dummy_proto.cpp b/protocols/Dummy/src/dummy_proto.cpp
index 9acb26d22d..d891531220 100644
--- a/protocols/Dummy/src/dummy_proto.cpp
+++ b/protocols/Dummy/src/dummy_proto.cpp
@@ -81,9 +81,9 @@ CDummyProto::~CDummyProto()
int CDummyProto::getTemplateId()
{
int id = this->getByte(DUMMY_ID_TEMPLATE, 0);
- if (id < 0 || id >= _countof(templates)) {
+ if (id < 0 || id >= _countof(templates))
return 0;
- }
+
return id;
}
diff --git a/protocols/Dummy/src/main.cpp b/protocols/Dummy/src/main.cpp
index 453a68b51c..f412e49ce5 100644
--- a/protocols/Dummy/src/main.cpp
+++ b/protocols/Dummy/src/main.cpp
@@ -77,3 +77,51 @@ extern "C" int __declspec(dllexport) Unload(void)
CMPlugin g_plugin;
extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// stubs for obsoleted protocols
+
+struct CMPluginAim : public ACCPROTOPLUGIN<CDummyProto>
+{
+ CMPluginAim() : ACCPROTOPLUGIN<CDummyProto>("AIM")
+ {
+ SetUniqueId("SN");
+ }
+}
+static g_pluginAim;
+
+struct CMPluginYahoo : public ACCPROTOPLUGIN<CDummyProto>
+{
+ CMPluginYahoo() : ACCPROTOPLUGIN<CDummyProto>("YAHOO")
+ {
+ SetUniqueId("yahoo_id");
+ }
+}
+static g_pluginYahoo;
+
+struct CMPluginTlen : public ACCPROTOPLUGIN<CDummyProto>
+{
+ CMPluginTlen() : ACCPROTOPLUGIN<CDummyProto>("TLEN")
+ {
+ SetUniqueId("jid");
+ }
+}
+static g_pluginTlen;
+
+struct CMPluginXFire : public ACCPROTOPLUGIN<CDummyProto>
+{
+ CMPluginXFire() : ACCPROTOPLUGIN<CDummyProto>("XFire")
+ {
+ SetUniqueId("Username");
+ }
+}
+static g_pluginXFire;
+
+struct CMPluginWhatsapp : public ACCPROTOPLUGIN<CDummyProto>
+{
+ CMPluginWhatsapp() : ACCPROTOPLUGIN<CDummyProto>("WhatsApp")
+ {
+ SetUniqueId("ID");
+ }
+}
+static g_pluginWhatsapp;