summaryrefslogtreecommitdiff
path: root/protocols/Facebook/src/proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Facebook/src/proto.cpp')
-rw-r--r--protocols/Facebook/src/proto.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/protocols/Facebook/src/proto.cpp b/protocols/Facebook/src/proto.cpp
index 87ca21d84b..d2011579de 100644
--- a/protocols/Facebook/src/proto.cpp
+++ b/protocols/Facebook/src/proto.cpp
@@ -134,23 +134,9 @@ FacebookProto::~FacebookProto()
void FacebookProto::OnModulesLoaded()
{
CMStringW wszPath(FORMAT, L"%s\\%S\\Stickers\\*.png", VARSW(L"%miranda_avatarcache%").get(), m_szModuleName);
+ SMADD_CONT cont = { 2, m_szModuleName, wszPath };
+ CallService(MS_SMILEYADD_LOADCONTACTSMILEYS, 0, LPARAM(&cont));
- WIN32_FIND_DATAW findData;
- HANDLE hFind = FindFirstFileW(wszPath, &findData);
- if (hFind != INVALID_HANDLE_VALUE) {
- wszPath.Truncate(wszPath.GetLength() - 5);
- do {
- CMStringW wszFileName = wszPath + findData.cFileName;
-
- SMADD_CONT cont;
- cont.cbSize = sizeof(SMADD_CONT);
- cont.hContact = 0;
- cont.type = 1;
- cont.path = wszFileName.GetBuffer();
- CallService(MS_SMILEYADD_LOADCONTACTSMILEYS, 0, (LPARAM)&cont);
- }
- while (FindNextFileW(hFind, &findData));
- }
}
void FacebookProto::OnShutdown()