summaryrefslogtreecommitdiff
path: root/tipper/popwin.cpp
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-06-27 05:27:30 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-06-27 05:27:30 +0000
commit2b8de7f0339506e75c47ffb0e14ee2e527ab1353 (patch)
tree1236a9f0999c0dcf7a8bea63290c40866a00d519 /tipper/popwin.cpp
parent239ad94877dcf2ef148143ab3c7debde94dbb6cc (diff)
added ersatz support (protocol-specific status messages)
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@210 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'tipper/popwin.cpp')
-rw-r--r--tipper/popwin.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/tipper/popwin.cpp b/tipper/popwin.cpp
index 7ff1cee..509d134 100644
--- a/tipper/popwin.cpp
+++ b/tipper/popwin.cpp
@@ -103,10 +103,16 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
TCHAR *temp = (TCHAR *)CallService(MS_AWAY_GETPROTOSTATUSMESSAGET, (LPARAM)status, (WPARAM)pwd->clcit.proto);
swzText = _tcsdup(temp);
mir_free(temp);
- } else if(ServiceExists(MS_AWAY_GETPROTOSTATUSMESSAGE))
+ } else if(ServiceExists(MS_AWAY_GETPROTOSTATUSMESSAGE)) {
status_msg = (char *)CallService(MS_AWAY_GETPROTOSTATUSMESSAGE, (LPARAM)status, (WPARAM)pwd->clcit.proto);
- else
- status_msg = (char *)CallService(MS_AWAYMSG_GETSTATUSMSG, status, 0);
+ } else {
+ char svc[256];
+ mir_snprintf(svc, 256, "%s%s", pwd->clcit.proto, PS_GETMYAWAYMSG);
+ if(ServiceExists(svc)) {
+ status_msg = (char *)CallService(svc, status, 0);
+ } else
+ status_msg = (char *)CallService(MS_AWAYMSG_GETSTATUSMSG, status, 0);
+ }
if(status_msg) swzText = a2t(status_msg);