diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/MraProto.cpp | 7 | ||||
-rw-r--r-- | protocols/MinecraftDynmap/src/proto.cpp | 1 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 5 | ||||
-rw-r--r-- | protocols/Steam/src/steam_events.cpp | 1 | ||||
-rw-r--r-- | protocols/Steam/src/steam_proto.cpp | 3 | ||||
-rw-r--r-- | protocols/Tox/src/tox_proto.cpp | 4 |
8 files changed, 14 insertions, 11 deletions
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index e839edf429..ed1d995c65 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -62,6 +62,7 @@ GaduProto::GaduProto(const char *pszProtoName, const wchar_t *tszUserName) : CreateProtoService(PS_LEAVECHAT, &GaduProto::leavechat);
HookProtoEvent(ME_DB_CONTACT_SETTINGCHANGED, &GaduProto::dbsettingchanged);
+ HookProtoEvent(ME_OPT_INITIALISE, &GaduProto::options_init);
// Offline contacts and clear logon time
setalloffline();
@@ -704,7 +705,6 @@ int GaduProto::UserIsTyping(MCONTACT hContact, int type) void GaduProto::OnModulesLoaded()
{
- HookProtoEvent(ME_OPT_INITIALISE, &GaduProto::options_init);
HookProtoEvent(ME_USERINFO_INITIALISE, &GaduProto::details_init);
// Init misc stuff
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index da2972c014..bc33862ae0 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -151,6 +151,7 @@ CIcqProto::CIcqProto(const char* aProtoName, const wchar_t* aUserName) : InitContactsCache();
HookProtoEvent(ME_CLIST_PREBUILDSTATUSMENU, &CIcqProto::OnPreBuildStatusMenu);
+ HookProtoEvent(ME_OPT_INITIALISE, &CIcqProto::OnOptionsInit);
// Register netlib users
wchar_t szBuffer[MAX_PATH + 64];
@@ -250,7 +251,6 @@ void CIcqProto::OnModulesLoaded() // Startup Auto Info-Update thread
icq_InitInfoUpdate();
- HookProtoEvent(ME_OPT_INITIALISE, &CIcqProto::OnOptionsInit);
HookProtoEvent(ME_USERINFO_INITIALISE, &CIcqProto::OnUserInfoInit);
HookProtoEvent(ME_IDLE_CHANGED, &CIcqProto::OnIdleChanged);
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index cd8448b080..5cc4d7de2d 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -32,6 +32,10 @@ CMraProto::CMraProto(const char* _module, const wchar_t* _displayName) : CreateProtoService(PS_SEND_NUDGE, &CMraProto::MraSendNudge);
CreateProtoService(PS_GETUNREADEMAILCOUNT, &CMraProto::GetUnreadEmailCount);
+ HookProtoEvent(ME_OPT_INITIALISE, &CMraProto::OnOptionsInit);
+ HookProtoEvent(ME_DB_CONTACT_DELETED, &CMraProto::MraContactDeleted);
+ HookProtoEvent(ME_DB_CONTACT_SETTINGCHANGED, &CMraProto::MraDbSettingChanged);
+
m_heNudgeReceived = CreateProtoEvent(PE_NUDGE);
wchar_t name[MAX_PATH];
@@ -80,9 +84,6 @@ INT_PTR CMraProto::MraCreateAccMgrUI(WPARAM, LPARAM lParam) void CMraProto::OnModulesLoaded()
{
HookProtoEvent(ME_CLIST_EXTRA_IMAGE_APPLY, &CMraProto::MraExtraIconsApply);
- HookProtoEvent(ME_OPT_INITIALISE, &CMraProto::OnOptionsInit);
- HookProtoEvent(ME_DB_CONTACT_DELETED, &CMraProto::MraContactDeleted);
- HookProtoEvent(ME_DB_CONTACT_SETTINGCHANGED, &CMraProto::MraDbSettingChanged);
HookProtoEvent(ME_CLIST_PREBUILDCONTACTMENU, &CMraProto::MraRebuildContactMenu);
HookProtoEvent(ME_WAT_NEWSTATUS, &CMraProto::MraMusicChanged);
HookProtoEvent(ME_CLIST_GROUPCHANGE, &CMraProto::OnGroupChanged);
diff --git a/protocols/MinecraftDynmap/src/proto.cpp b/protocols/MinecraftDynmap/src/proto.cpp index 4fe03a0547..3b7d491a0c 100644 --- a/protocols/MinecraftDynmap/src/proto.cpp +++ b/protocols/MinecraftDynmap/src/proto.cpp @@ -38,7 +38,6 @@ MinecraftDynmapProto::MinecraftDynmapProto(const char* proto_name, const wchar_t CreateProtoService(PS_CREATEACCMGRUI, &MinecraftDynmapProto::SvcCreateAccMgrUI); - // HookProtoEvent(ME_OPT_INITIALISE, &MinecraftDynmapProto::OnOptionsInit); HookProtoEvent(ME_GC_EVENT, &MinecraftDynmapProto::OnChatEvent); // Create standard network connection diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index fde09f0757..48046fa198 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -45,6 +45,9 @@ CSkypeProto::CSkypeProto(const char* protoName, const wchar_t* userName) : CreateProtoService("/IncomingCallCLE", &CSkypeProto::OnIncomingCallCLE); CreateProtoService("/IncomingCallPP", &CSkypeProto::OnIncomingCallPP); + HookProtoEvent(ME_OPT_INITIALISE, &CSkypeProto::OnOptionsInit); + HookProtoEvent(ME_DB_EVENT_MARKED_READ, &CSkypeProto::OnDbEventRead); + m_tszAvatarFolder = std::wstring(VARSW(L"%miranda_avatarcache%")) + L"\\" + m_tszUserName; DWORD dwAttributes = GetFileAttributes(m_tszAvatarFolder.c_str()); if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) @@ -85,9 +88,7 @@ void CSkypeProto::OnModulesLoaded() { setAllContactStatuses(ID_STATUS_OFFLINE, true); - HookProtoEvent(ME_OPT_INITIALISE, &CSkypeProto::OnOptionsInit); HookProtoEvent(ME_MSG_PRECREATEEVENT, &CSkypeProto::OnPreCreateMessage); - HookProtoEvent(ME_DB_EVENT_MARKED_READ, &CSkypeProto::OnDbEventRead); InitDBEvents(); InitPopups(); diff --git a/protocols/Steam/src/steam_events.cpp b/protocols/Steam/src/steam_events.cpp index f98573de45..11411a00d5 100644 --- a/protocols/Steam/src/steam_events.cpp +++ b/protocols/Steam/src/steam_events.cpp @@ -4,7 +4,6 @@ void CSteamProto::OnModulesLoaded() { Clist_GroupCreate(0, m_defaultGroup); - HookProtoEvent(ME_OPT_INITIALISE, &CSteamProto::OnOptionsInit); HookProtoEvent(ME_IDLE_CHANGED, &CSteamProto::OnIdleChanged); HookProtoEvent(ME_MSG_PRECREATEEVENT, &CSteamProto::OnPreCreateMessage); diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index 4988470c66..dc64c54e33 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -69,6 +69,9 @@ CSteamProto::CSteamProto(const char* protoName, const wchar_t* userName) // custom db events API CreateProtoService(STEAM_DB_GETEVENTTEXT_CHATSTATES, &CSteamProto::OnGetEventTextChatStates); + // hooks + HookProtoEvent(ME_OPT_INITIALISE, &CSteamProto::OnOptionsInit); + // netlib support wchar_t name[128]; mir_snwprintf(name, TranslateT("%s connection"), m_tszUserName); diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index 40c34ff828..b71f664f20 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -36,6 +36,7 @@ CToxProto::CToxProto(const char* protoName, const wchar_t* userName) CreateServiceFunction(MODULE "/GetEventIcon", &CToxProto::EventGetIcon);
HookProtoEvent(ME_CLIST_PREBUILDCONTACTMENU, &CToxProto::OnPrebuildContactMenu);
+ HookProtoEvent(ME_OPT_INITIALISE, &CToxProto::OnOptionsInit);
HookProtoEvent(ME_PROTO_ACCLISTCHANGED, &CToxProto::OnAccountRenamed);
m_hTimerQueue = CreateTimerQueue();
@@ -51,9 +52,8 @@ void CToxProto::OnModulesLoaded() {
Clist_GroupCreate(0, m_defaultGroup);
- HookProtoEvent(ME_OPT_INITIALISE, &CToxProto::OnOptionsInit);
- HookProtoEvent(ME_USERINFO_INITIALISE, &CToxProto::OnUserInfoInit);
HookProtoEvent(ME_MSG_PRECREATEEVENT, &CToxProto::OnPreCreateMessage);
+ HookProtoEvent(ME_USERINFO_INITIALISE, &CToxProto::OnUserInfoInit);
InitCustomDbEvents();
}
|