summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-06 20:42:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-06 20:42:44 +0000
commitef3a12230d1adc2084d0bc68ac57c00d84fa6275 (patch)
tree528de15dba6adfb651f1c7cc0cde34990ab2c02c /protocols/FacebookRM
parentf9d22579b0d94894770361b871141e6c0f76842b (diff)
simple & effective core version calculation
git-svn-id: http://svn.miranda-ng.org/main/trunk@6380 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r--protocols/FacebookRM/src/main.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp
index f22ce7b0d0..f960c9475e 100644
--- a/protocols/FacebookRM/src/main.cpp
+++ b/protocols/FacebookRM/src/main.cpp
@@ -100,33 +100,24 @@ extern "C" int __declspec(dllexport) Load(void)
pd.fnInit = protoInit;
pd.fnUninit = protoUninit;
CallService(MS_PROTO_REGISTERMODULE,0,reinterpret_cast<LPARAM>(&pd));
-
InitIcons();
InitContactMenus();
// Init native User-Agent
- {
- std::stringstream agent;
-// DWORD mir_ver = (DWORD)CallService(MS_SYSTEM_GETVERSION, NULL, NULL);
- agent << "MirandaNG/";
- agent << ((g_mirandaVersion >> 24) & 0xFF);
- agent << ".";
- agent << ((g_mirandaVersion >> 16) & 0xFF);
- agent << ".";
- agent << ((g_mirandaVersion >> 8) & 0xFF);
- agent << ".";
- agent << ((g_mirandaVersion ) & 0xFF);
+ WORD v[4];
+ CallService(MS_SYSTEM_GETFILEVERSION, 0, (LPARAM)v);
+ std::stringstream agent;
+ agent << "MirandaNG/" << v[0] << "." << v[1] << "." << v[2] << "." << v[3] << ".";
#ifdef _WIN64
agent << " Facebook Protocol RM x64/";
#else
agent << " Facebook Protocol RM/";
#endif
- agent << __VERSION_STRING;
- g_strUserAgent = agent.str();
- }
+ agent << __VERSION_STRING;
+ g_strUserAgent = agent.str();
- return 0;
+ return 0;
}
/////////////////////////////////////////////////////////////////////////////////////////