diff options
Diffstat (limited to 'plugins/SeenPlugin/main.cpp')
-rw-r--r-- | plugins/SeenPlugin/main.cpp | 51 |
1 files changed, 9 insertions, 42 deletions
diff --git a/plugins/SeenPlugin/main.cpp b/plugins/SeenPlugin/main.cpp index dd9a91b840..949a898cd6 100644 --- a/plugins/SeenPlugin/main.cpp +++ b/plugins/SeenPlugin/main.cpp @@ -24,23 +24,22 @@ Last change by : $Author: y_b $ */
#include "seen.h"
-
HINSTANCE hInstance;
HANDLE ehdb = NULL, ehproto = NULL, ehmissed = NULL, ehuserinfo = NULL, ehmissed_proto = NULL, hOptInit = NULL, hMainInit = NULL;
PLUGINLINK *pluginLink;
struct MM_INTERFACE mmi;
int hLangpack;
-char authemail[] = "fscking@spammer.oip.info";//the correct e-mail shall be constructed in DllMain
+
PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
"Last seen",
PLUGIN_MAKE_VERSION(5,0,4,7),
"Log when a user was last seen online and which users were online while you were away.",
"Heiko Schillinger, YB",
- authemail,
+ "y_b@saaplugin.no-ip.info",
"© 2001-2002 Heiko Schillinger, 2003 modified by Bruno Rino, 2005-7 Modified by YB",
"http://forums.miranda-im.org/showthread.php?t=2822",
- 0,
+ UNICODE_AWARE,
0,
{ 0x2d506d46,0xc94e,0x4ef8,{0x85, 0x37, 0xf1, 0x12, 0x33, 0xa8, 0x03, 0x81}}/* 2d506d46-c94e-4ef8-8537-f11233a80381 */
};
@@ -51,24 +50,10 @@ DBVTranslation idleTr[TRANSNUMBER]={ {(TranslateFunc*)any_to_Idle, _T("Any to /Idle or empty"),0}
};
-
-
-int OptionsInit(WPARAM,LPARAM);
-int UserinfoInit(WPARAM,LPARAM);
-int InitFileOutput(void);
-void InitMenuitem(void);
-int UpdateValues(WPARAM,LPARAM);
-int ModeChange(WPARAM,LPARAM);
-//int GetInfoAck(WPARAM,LPARAM);
-void SetOffline(void);
-int ModeChange_mo(WPARAM,LPARAM);
-int CheckIfOnline(void);
-
BOOL includeIdle;
logthread_info **contactQueue = NULL;
int contactQueueSize = 0;
-
int MainInit(WPARAM wparam,LPARAM lparam)
{
contactQueueSize = 16*sizeof(logthread_info *);
@@ -91,7 +76,7 @@ int MainInit(WPARAM wparam,LPARAM lparam) if(DBGetContactSettingByte(NULL,S_MOD,"MissedOnes",0))
ehmissed_proto=HookEvent(ME_PROTO_ACK,ModeChange_mo);
- ehdb = HookEvent(ME_DB_CONTACT_SETTINGCHANGED,UpdateValues);
+ ehdb = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, UpdateValues);
ehproto = HookEvent(ME_PROTO_ACK,ModeChange);
SkinAddNewSoundEx("LastSeenTrackedStatusChange", LPGEN("LastSeen"), LPGEN("User status change"));
@@ -114,20 +99,12 @@ int MainInit(WPARAM wparam,LPARAM lparam) return 0;
}
-__declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD mirandaVersion)
{
- pluginInfo.cbSize = sizeof( PLUGININFOEX );
return &pluginInfo;
}
-#define MIID_LASTSEEN {0x0df23e71, 0x7950, 0x43d5, {0xb9, 0x86, 0x7a, 0xbf, 0xf5, 0xa5, 0x40, 0x18}}
-static const MUUID interfaces[] = {MIID_LASTSEEN, MIID_LAST};
-__declspec(dllexport) const MUUID * MirandaPluginInterfaces(void)
-{
- return interfaces;
-}
-
-__declspec(dllexport)int Unload(void)
+extern "C" __declspec(dllexport) int Unload(void)
{
UnhookEvent(ehdb);
if(ehmissed) UnhookEvent(ehmissed);
@@ -141,18 +118,13 @@ __declspec(dllexport)int Unload(void) return 0;
}
-
-
-BOOL WINAPI DllMain(HINSTANCE hinst,DWORD fdwReason,LPVOID lpvReserved)
+BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID lpvReserved)
{
- memcpy(pluginInfo.authorEmail,"y_b@saaplugin.no-",17);
hInstance=hinst;
return 1;
}
-
-
-int __declspec(dllexport)Load(PLUGINLINK *link)
+extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
{
pluginLink=link;
mir_getMMI(&mmi);
@@ -164,9 +136,4 @@ int __declspec(dllexport)Load(PLUGINLINK *link) // to be safer in my opinion
hMainInit = HookEvent(ME_SYSTEM_MODULESLOADED,MainInit);
return 0;
-}
-
-
-
-
-
+}
\ No newline at end of file |