summaryrefslogtreecommitdiff
path: root/plugins/ConnectionNotify/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-31 15:29:24 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-31 15:29:24 +0000
commit9ac20243efe27f58501c59060a4f22c37104c0e3 (patch)
treecf00f03c151d21e062a46f1a85eeb0be8a9342f2 /plugins/ConnectionNotify/src
parent2738cf4311501acfc1b0e2de74b51b0edc18cdd2 (diff)
- PROTOCOLDESCRIPTOR_V3_SIZE to identify an ANSI plugin;
- absence of fnInitFunc to identify a protocol without instances; - whole bunch of ansi crutches discarded git-svn-id: http://svn.miranda-ng.org/main/trunk@13937 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ConnectionNotify/src')
-rw-r--r--plugins/ConnectionNotify/src/ConnectionNotify.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
index 32eaf32610..387df80cda 100644
--- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp
+++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
@@ -864,33 +864,30 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
hInst = hinstDLL;
return TRUE;
}
+
extern "C" int __declspec(dllexport) Load(void)
{
- char service[100] = { "" };
-
- PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
-
#ifdef _DEBUG
_OutputDebugString(_T("Entering Load dll"));
#endif
mir_getLP(&pluginInfo);
- //hCurrentEditMutex=CreateMutex(NULL,FALSE,_T("CurrentEditMutex"));
hExceptionsMutex = CreateMutex(NULL, FALSE, _T("ExceptionsMutex"));
LoadSettings();
connExceptions = LoadSettingsConnections();
- //create protocol
- //memset(&pd, 0, sizeof(pd));
- //pd.cbSize=sizeof(pd);
+
+ PROTOCOLDESCRIPTOR pd = { 0 };
+ pd.cbSize = sizeof(pd);
pd.szName = PLUGINNAME;
pd.type = PROTOTYPE_PROTOCOL;
CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
- //set all contacts to offline
+ //set all contacts to offline
for (MCONTACT hContact = db_find_first(PLUGINNAME); hContact != NULL; hContact = db_find_next(hContact, PLUGINNAME))
db_set_w(hContact, PLUGINNAME, "status", ID_STATUS_OFFLINE);
+ char service[100] = { "" };
mir_snprintf(service, SIZEOF(service), "%s%s", PLUGINNAME, PS_GETCAPS);
CreateServiceFunction(service, GetCaps);
mir_snprintf(service, SIZEOF(service), "%s%s", PLUGINNAME, PS_GETNAME);
@@ -902,7 +899,6 @@ extern "C" int __declspec(dllexport) Load(void)
mir_snprintf(service, SIZEOF(service), "%s%s", PLUGINNAME, PS_GETSTATUS);
CreateServiceFunction(service, GetStatus);
-
SkinAddNewSoundEx(PLUGINNAME_NEWSOUND, PLUGINNAME, LPGEN("New Connection Notification"));
hOptInit = HookEvent(ME_OPT_INITIALISE, ConnectionNotifyOptInit);//register service to hook option call
assert(hOptInit);