From f28932a9312ce067782665b9497f8203483d748d Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Mon, 20 Oct 2014 19:58:59 +0000 Subject: SeenPlugin: -Create services on startup git-svn-id: http://svn.miranda-ng.org/main/trunk@10842 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SeenPlugin/src/main.cpp | 45 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'plugins/SeenPlugin') diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp index c1d07fb08f..c59b7927e7 100644 --- a/plugins/SeenPlugin/src/main.cpp +++ b/plugins/SeenPlugin/src/main.cpp @@ -54,29 +54,6 @@ void UninitHistoryDialog(void); int MainInit(WPARAM,LPARAM) { - includeIdle = (BOOL )db_get_b(NULL,S_MOD,"IdleSupport",1); - HookEvent(ME_OPT_INITIALISE, OptionsInit); - - if ( db_get_b(NULL,S_MOD,"MenuItem",1)) - InitMenuitem(); - - if ( db_get_b(NULL,S_MOD,"UserinfoTab",1)) - ehuserinfo = HookEvent(ME_USERINFO_INITIALISE,UserinfoInit); - - if ( db_get_b(NULL,S_MOD,"FileOutput",0)) - InitFileOutput(); - - if ( db_get_b(NULL,S_MOD,"MissedOnes",0)) - ehmissed_proto = HookEvent(ME_PROTO_ACK,ModeChange_mo); - - HookEvent(ME_DB_CONTACT_SETTINGCHANGED, UpdateValues); - HookEvent(ME_PROTO_ACK,ModeChange); - - SkinAddNewSoundExT("LastSeenTrackedStatusChange", LPGENT("LastSeen"), LPGENT("User status change")); - SkinAddNewSoundExT("LastSeenTrackedStatusOnline", LPGENT("LastSeen"), LPGENT("Changed to Online")); - SkinAddNewSoundExT("LastSeenTrackedStatusOffline", LPGENT("LastSeen"), LPGENT("User Logged Off")); - SkinAddNewSoundExT("LastSeenTrackedStatusFromOffline", LPGENT("LastSeen"), LPGENT("User Logged In")); - if ( ServiceExists(MS_TIPPER_ADDTRANSLATION)) for (int i=0; i < TRANSNUMBER; i++) CallService(MS_TIPPER_ADDTRANSLATION, 0, (LPARAM)&idleTr[i]); @@ -99,6 +76,28 @@ extern "C" __declspec(dllexport) int Load(void) HookEvent(ME_SYSTEM_MODULESLOADED, MainInit); HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown); + HookEvent(ME_OPT_INITIALISE, OptionsInit); + HookEvent(ME_DB_CONTACT_SETTINGCHANGED, UpdateValues); + HookEvent(ME_PROTO_ACK,ModeChange); + + includeIdle = (BOOL )db_get_b(NULL,S_MOD,"IdleSupport",1); + + if ( db_get_b(NULL,S_MOD,"MenuItem",1)) + InitMenuitem(); + + if ( db_get_b(NULL,S_MOD,"UserinfoTab",1)) + ehuserinfo = HookEvent(ME_USERINFO_INITIALISE,UserinfoInit); + + if ( db_get_b(NULL,S_MOD,"FileOutput",0)) + InitFileOutput(); + + if ( db_get_b(NULL,S_MOD,"MissedOnes",0)) + ehmissed_proto = HookEvent(ME_PROTO_ACK,ModeChange_mo); + + SkinAddNewSoundExT("LastSeenTrackedStatusChange", LPGENT("LastSeen"), LPGENT("User status change")); + SkinAddNewSoundExT("LastSeenTrackedStatusOnline", LPGENT("LastSeen"), LPGENT("Changed to Online")); + SkinAddNewSoundExT("LastSeenTrackedStatusOffline", LPGENT("LastSeen"), LPGENT("User Logged Off")); + SkinAddNewSoundExT("LastSeenTrackedStatusFromOffline", LPGENT("LastSeen"), LPGENT("User Logged In")); return 0; } -- cgit v1.2.3