From 0ece30dc7c0e34b4c5911969b8fa99c33c6d023c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 30 Nov 2022 17:48:47 +0300 Subject: Telegram: update for TDLIB --- protocols/Telegram/src/main.cpp | 17 +++++++++-------- protocols/Telegram/src/stdafx.h | 6 +----- 2 files changed, 10 insertions(+), 13 deletions(-) (limited to 'protocols/Telegram/src') diff --git a/protocols/Telegram/src/main.cpp b/protocols/Telegram/src/main.cpp index 3e25624f7f..0315936c3f 100644 --- a/protocols/Telegram/src/main.cpp +++ b/protocols/Telegram/src/main.cpp @@ -1,8 +1,11 @@ #include "stdafx.h" int hLangpack; +CMPlugin g_plugin; + +///////////////////////////////////////////////////////////////////////////////////////// -PLUGININFOEX pluginInfo = +static PLUGININFOEX pluginInfo = { sizeof(PLUGININFOEX), __PLUGIN_NAME, @@ -14,14 +17,13 @@ PLUGININFOEX pluginInfo = UNICODE_AWARE, // {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7} {0xae708252, 0xdf8, 0x42ba, {0x9e, 0xf9, 0x9a, 0xcc, 0x3, 0x8e, 0xed, 0xa7}} - }; -///////////////////////////////////////////////////////////////////////////////////////// - -CMPlugin g_plugin; - -extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain; +CMPlugin::CMPlugin() : + ACCPROTOPLUGIN("Telegram", pluginInfo) +{ + SetUniqueId("Phone"); +} ///////////////////////////////////////////////////////////////////////////////////////// @@ -31,7 +33,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); return 0; } diff --git a/protocols/Telegram/src/stdafx.h b/protocols/Telegram/src/stdafx.h index 06f32c205d..f039dc6474 100644 --- a/protocols/Telegram/src/stdafx.h +++ b/protocols/Telegram/src/stdafx.h @@ -21,11 +21,7 @@ struct CMTProto; struct CMPlugin : public ACCPROTOPLUGIN { - CMPlugin() : - ACCPROTOPLUGIN("TELEGRAM") - { - SetUniqueId("Phone"); - } + CMPlugin(); }; #endif //_COMMON_H_ \ No newline at end of file -- cgit v1.2.3