diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-04-06 22:26:19 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-04-06 22:26:19 +0000 |
commit | 0265dc79dea41fc7a03ddc136d3ba69339f9b860 (patch) | |
tree | b9d8a9ae2b0320798144606b6ab0600db54e1b71 /plugins/MyDetails/src/services.cpp | |
parent | 32b8d5b2a8c3dd67cf15841ceae382c7114374f3 (diff) |
MyDetails: Minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@12645 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MyDetails/src/services.cpp')
-rw-r--r-- | plugins/MyDetails/src/services.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/MyDetails/src/services.cpp b/plugins/MyDetails/src/services.cpp index d4460ea744..2c68022b63 100644 --- a/plugins/MyDetails/src/services.cpp +++ b/plugins/MyDetails/src/services.cpp @@ -403,7 +403,7 @@ INT_PTR PluginCommand_SetMyStatusMessageUI(WPARAM wParam, LPARAM lParam) int proto_num = -1;
Protocol *proto = NULL;
- if (status < ID_STATUS_OFFLINE || status > ID_STATUS_OUTTOLUNCH)
+ if (status != 0 && (status < ID_STATUS_OFFLINE || status > ID_STATUS_OUTTOLUNCH))
return -10;
if (proto_name != NULL) {
@@ -423,7 +423,12 @@ INT_PTR PluginCommand_SetMyStatusMessageUI(WPARAM wParam, LPARAM lParam) return -2;
}
else if (ServiceExists(MS_SIMPLESTATUSMSG_CHANGESTATUSMSG)) {
- CallService(MS_SIMPLESTATUSMSG_CHANGESTATUSMSG, status, (LPARAM)proto_name);
+ if (status != 0)
+ CallService(MS_SIMPLESTATUSMSG_CHANGESTATUSMSG, status, (LPARAM)proto_name);
+ else if (proto != 0)
+ CallService(MS_SIMPLESTATUSMSG_CHANGESTATUSMSG, proto->status, (LPARAM)proto_name);
+ else
+ CallService(MS_SIMPLESTATUSMSG_CHANGESTATUSMSG, protocols->GetGlobalStatus(), NULL);
return 0;
}
|