summaryrefslogtreecommitdiff
path: root/protocols/Steam
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam')
-rw-r--r--protocols/Steam/src/steam_events.cpp15
-rw-r--r--protocols/Steam/src/steam_proto.cpp15
2 files changed, 15 insertions, 15 deletions
diff --git a/protocols/Steam/src/steam_events.cpp b/protocols/Steam/src/steam_events.cpp
index cbaf2302ae..2e91508915 100644
--- a/protocols/Steam/src/steam_events.cpp
+++ b/protocols/Steam/src/steam_events.cpp
@@ -5,29 +5,14 @@ int CSteamProto::OnModulesLoaded(WPARAM, LPARAM)
HookProtoEvent(ME_OPT_INITIALISE, &CSteamProto::OnOptionsInit);
HookProtoEvent(ME_IDLE_CHANGED, &CSteamProto::OnIdleChanged);
- TCHAR name[128];
- mir_sntprintf(name, SIZEOF(name), TranslateT("%s connection"), m_tszUserName);
-
- NETLIBUSER nlu = { sizeof(nlu) };
- nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
- nlu.ptszDescriptiveName = name;
- nlu.szSettingsModule = m_szModuleName;
- m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
-
- requestQueue = new RequestQueue(m_hNetlibUser);
-
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, &CSteamProto::PrebuildContactMenu);
-
return 0;
}
int CSteamProto::OnPreShutdown(WPARAM, LPARAM)
{
- delete requestQueue;
-
Netlib_CloseHandle(this->m_hNetlibUser);
this->m_hNetlibUser = NULL;
-
return 0;
}
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp
index 82f398ecb8..f613f339a2 100644
--- a/protocols/Steam/src/steam_proto.cpp
+++ b/protocols/Steam/src/steam_proto.cpp
@@ -52,18 +52,33 @@ CSteamProto::CSteamProto(const char* protoName, const TCHAR* userName) :
// services
CreateServiceFunction(MODULE"/MenuChoose", CSteamProto::MenuChooseService);
+
// avatar API
CreateProtoService(PS_GETAVATARINFO, &CSteamProto::GetAvatarInfo);
CreateProtoService(PS_GETAVATARCAPS, &CSteamProto::GetAvatarCaps);
CreateProtoService(PS_GETMYAVATAR, &CSteamProto::GetMyAvatar);
+
// custom status API
CreateProtoService(PS_GETCUSTOMSTATUSEX, &CSteamProto::OnGetXStatusEx);
CreateProtoService(PS_GETCUSTOMSTATUSICON, &CSteamProto::OnGetXStatusIcon);
CreateProtoService(PS_GETADVANCEDSTATUSICON, &CSteamProto::OnRequestAdvStatusIconIdx);
+
+ // netlib support
+ TCHAR name[128];
+ mir_sntprintf(name, SIZEOF(name), TranslateT("%s connection"), m_tszUserName);
+
+ NETLIBUSER nlu = { sizeof(nlu) };
+ nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
+ nlu.ptszDescriptiveName = name;
+ nlu.szSettingsModule = m_szModuleName;
+ m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
+
+ requestQueue = new RequestQueue(m_hNetlibUser);
}
CSteamProto::~CSteamProto()
{
+ delete requestQueue;
}
MCONTACT CSteamProto::AddToList(int, PROTOSEARCHRESULT* psr)