summaryrefslogtreecommitdiff
path: root/plugins/MyDetails/src/data.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-10-04 13:05:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-10-04 13:05:13 +0000
commit7ae21189d524cac5580a786732ca9ec4faf99260 (patch)
tree1bbf7f34fb3be56098cadb311743d94a412762b5 /plugins/MyDetails/src/data.cpp
parent0c3fbeb0557c85cbe7c103053c869b6e3b42fab6 (diff)
services moved to the separate module
git-svn-id: http://svn.miranda-ng.org/main/trunk@10684 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MyDetails/src/data.cpp')
-rw-r--r--plugins/MyDetails/src/data.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp
index bb2dd807ae..55b8a564d9 100644
--- a/plugins/MyDetails/src/data.cpp
+++ b/plugins/MyDetails/src/data.cpp
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
-
#include "commons.h"
static char *StatusModeToDbSetting(int status, const char *suffix);
@@ -253,13 +252,7 @@ bool Protocol::HasAvatar()
bool Protocol::CanGetAvatar()
{
- if (!can_have_avatar)
- return false;
-
- if (!ServiceExists(MS_AV_GETMYAVATAR))
- return false;
-
- return true;
+ return (can_have_avatar && g_bAvsExist);
}
void Protocol::GetAvatar()
@@ -345,16 +338,13 @@ void Protocol::SetNick(const TCHAR *nick)
bool Protocol::CanSetAvatar()
{
- return ServiceExists(MS_AV_SETMYAVATAR) != FALSE && ServiceExists(MS_AV_CANSETMYAVATAR) != FALSE &&
- CallService(MS_AV_CANSETMYAVATAR, (WPARAM)name, 0);
+ return g_bAvsExist && CallService(MS_AV_CANSETMYAVATAR, (WPARAM)name, 0);
}
void Protocol::SetAvatar(const TCHAR *file_name)
{
- if (!CanSetAvatar())
- return;
-
- CallService(MS_AV_SETMYAVATART, (WPARAM)name, (LPARAM)file_name);
+ if (CanSetAvatar())
+ CallService(MS_AV_SETMYAVATART, (WPARAM)name, (LPARAM)file_name);
}
bool Protocol::CanGetListeningTo()
@@ -479,7 +469,7 @@ int ProtocolArray::GetGlobalStatus()
bool ProtocolArray::CanSetAvatars()
{
- return ServiceExists(MS_AV_SETMYAVATART) != FALSE;
+ return g_bAvsExist;
}
void ProtocolArray::SetAvatars(const TCHAR *file_name)