summaryrefslogtreecommitdiff
path: root/plugins/MyDetails/src/services.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-04-06 19:12:09 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-04-06 19:12:09 +0000
commit30b23a3b901afcdc2a834ae7d4858babc78013b5 (patch)
tree45688ead9c7b812c82bcb36058e0141a486b8490 /plugins/MyDetails/src/services.cpp
parentec6bdb06f02e0a6ecd7ee84e84c8c70ac42ae7de (diff)
MyDetails: Minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@12640 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MyDetails/src/services.cpp')
-rw-r--r--plugins/MyDetails/src/services.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/plugins/MyDetails/src/services.cpp b/plugins/MyDetails/src/services.cpp
index 80de374451..d4460ea744 100644
--- a/plugins/MyDetails/src/services.cpp
+++ b/plugins/MyDetails/src/services.cpp
@@ -188,11 +188,7 @@ INT_PTR PluginCommand_GetMyNickname(WPARAM wParam, LPARAM lParam)
char *proto = (char *)wParam;
if (proto == NULL) {
- if (protocols->default_nick != NULL)
- mir_tstrncpy(ret, protocols->default_nick, MS_MYDETAILS_GETMYNICKNAME_BUFFER_SIZE);
- else
- ret[0] = '\0';
-
+ mir_tstrncpy(ret, protocols->default_nick, MS_MYDETAILS_GETMYNICKNAME_BUFFER_SIZE);
return 0;
}
else {
@@ -267,11 +263,7 @@ INT_PTR PluginCommand_GetMyAvatar(WPARAM wParam, LPARAM lParam)
return -1;
if (proto == NULL) {
- if (protocols->default_avatar_file != NULL)
- mir_tstrncpy(ret, protocols->default_avatar_file, MS_MYDETAILS_GETMYAVATAR_BUFFER_SIZE);
- else
- ret[0] = '\0';
-
+ mir_tstrncpy(ret, protocols->default_avatar_file, MS_MYDETAILS_GETMYAVATAR_BUFFER_SIZE);
return 0;
}
@@ -411,7 +403,7 @@ INT_PTR PluginCommand_SetMyStatusMessageUI(WPARAM wParam, LPARAM lParam)
int proto_num = -1;
Protocol *proto = NULL;
- if (status != 0 && (status < ID_STATUS_OFFLINE || status > ID_STATUS_OUTTOLUNCH))
+ if (status < ID_STATUS_OFFLINE || status > ID_STATUS_OUTTOLUNCH)
return -10;
if (proto_name != NULL) {
@@ -431,13 +423,7 @@ INT_PTR PluginCommand_SetMyStatusMessageUI(WPARAM wParam, LPARAM lParam)
return -2;
}
else if (ServiceExists(MS_SIMPLESTATUSMSG_CHANGESTATUSMSG)) {
- if (proto == NULL && status == 0)
- CallService(MS_SIMPLESTATUSMSG_CHANGESTATUSMSG, protocols->GetGlobalStatus(), NULL);
- else if (status == 0)
- CallService(MS_SIMPLESTATUSMSG_CHANGESTATUSMSG, proto->status, (LPARAM)proto_name);
- else
- CallService(MS_SIMPLESTATUSMSG_CHANGESTATUSMSG, status, (LPARAM)proto_name);
-
+ CallService(MS_SIMPLESTATUSMSG_CHANGESTATUSMSG, status, (LPARAM)proto_name);
return 0;
}