From 2d0241cce00df9e38404009b1a4179d7b2b8af3c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 8 May 2018 11:34:37 +0200 Subject: Dummy: added stubs for deprecated protocols --- protocols/Dummy/src/dummy_proto.cpp | 4 ++-- protocols/Dummy/src/main.cpp | 48 +++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) (limited to 'protocols/Dummy/src') 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 +{ + CMPluginAim() : ACCPROTOPLUGIN("AIM") + { + SetUniqueId("SN"); + } +} +static g_pluginAim; + +struct CMPluginYahoo : public ACCPROTOPLUGIN +{ + CMPluginYahoo() : ACCPROTOPLUGIN("YAHOO") + { + SetUniqueId("yahoo_id"); + } +} +static g_pluginYahoo; + +struct CMPluginTlen : public ACCPROTOPLUGIN +{ + CMPluginTlen() : ACCPROTOPLUGIN("TLEN") + { + SetUniqueId("jid"); + } +} +static g_pluginTlen; + +struct CMPluginXFire : public ACCPROTOPLUGIN +{ + CMPluginXFire() : ACCPROTOPLUGIN("XFire") + { + SetUniqueId("Username"); + } +} +static g_pluginXFire; + +struct CMPluginWhatsapp : public ACCPROTOPLUGIN +{ + CMPluginWhatsapp() : ACCPROTOPLUGIN("WhatsApp") + { + SetUniqueId("ID"); + } +} +static g_pluginWhatsapp; -- cgit v1.2.3