diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-27 13:50:53 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-27 13:50:53 +0000 |
commit | 5f8a607f900a42e27bf166b86185001aadf3e9f2 (patch) | |
tree | 6c69f5caebc55e84437ddc23013fada0a69af397 /plugins/StatusPlugins/commonstatus.cpp | |
parent | 5e0f2fb896d874f9b7f5c069a90de64305089542 (diff) |
more fun:
- MS_AWAYMSG_GETSTATUSMSGW/T is present in any MIID_SRAWAY plugin, so there's no need to check its existence;
- therefore MS_AWAYMSG_GETSTATUSMSG considered useless, cause it has no references
git-svn-id: http://svn.miranda-ng.org/main/trunk@8293 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/commonstatus.cpp')
-rw-r--r-- | plugins/StatusPlugins/commonstatus.cpp | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/plugins/StatusPlugins/commonstatus.cpp b/plugins/StatusPlugins/commonstatus.cpp index 3f2963748d..74218f4ebf 100644 --- a/plugins/StatusPlugins/commonstatus.cpp +++ b/plugins/StatusPlugins/commonstatus.cpp @@ -119,34 +119,9 @@ TCHAR* GetDefaultStatusMessage(PROTOCOLSETTINGEX *ps, int newstatus) return mir_tstrdup(ps->szMsg);
}
- if (ServiceExists(MS_AWAYMSG_GETSTATUSMSGT)) {
- TCHAR* tMsg = (TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGT, newstatus, (LPARAM)ps->szName);
- log_debugA("CommonStatus: Status message retrieved from general awaysys (TCHAR)");
- return tMsg;
- }
-
- if (ServiceExists(MS_AWAYMSG_GETSTATUSMSG)) {
- char *tMsg;
- if (ServiceExists(MS_SA_ISSARUNNING) && CallService(MS_SA_ISSARUNNING, 0, 0))
- tMsg = (char*)CallService(MS_AWAYMSG_GETSTATUSMSG, (WPARAM)newstatus, (LPARAM)ps->szName);
- else
- tMsg = (char*)CallService(MS_AWAYMSG_GETSTATUSMSG, (WPARAM)newstatus, 0);
-
- log_debugA("CommonStatus: Status message retrieved from general awaysys");
-
- TCHAR* result = mir_a2t(tMsg);
- mir_free(tMsg);
- return result;
- }
-
- /* awaysys doesn't define the service above */
- TCHAR* tMsg = GetDefaultMessage(newstatus);
- if (tMsg != NULL) {
- log_debugA("CommonStatus: Status message retrieved from defaults");
- return mir_tstrdup(tMsg);
- }
-
- return NULL;
+ TCHAR *tMsg = (TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGT, newstatus, (LPARAM)ps->szName);
+ log_debugA("CommonStatus: Status message retrieved from general awaysys: %S", tMsg);
+ return tMsg;
}
static int equalsGlobalStatus(PROTOCOLSETTINGEX **ps)
|