summaryrefslogtreecommitdiff
path: root/plugins/NewAwaySysMod/src/Services.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewAwaySysMod/src/Services.cpp')
-rw-r--r--plugins/NewAwaySysMod/src/Services.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/plugins/NewAwaySysMod/src/Services.cpp b/plugins/NewAwaySysMod/src/Services.cpp
index 5696b98766..bce50f84d3 100644
--- a/plugins/NewAwaySysMod/src/Services.cpp
+++ b/plugins/NewAwaySysMod/src/Services.cpp
@@ -53,18 +53,19 @@ __inline void PSSetStatus(char *szProto, WORD Status, int bNoClistSetStatusMode
INT_PTR GetStatusMsg(WPARAM wParam, LPARAM)
{
LogMessage("MS_AWAYMSG_GETSTATUSMSG called. status=%d", wParam);
- CString Msg(_T2A(GetDynamicStatMsg(INVALID_CONTACT_ID, NULL, 0, wParam)));
- char *szMsg;
- if (Msg == NULL) // it's ok to return NULL, so we'll do it
- szMsg = NULL;
- else {
- szMsg = (char*)mir_alloc(Msg.GetLen() + 1);
- lstrcpyA(szMsg, Msg);
- }
+ char *szMsg = mir_t2a(GetDynamicStatMsg(INVALID_CONTACT_ID, NULL, 0, wParam));
LogMessage("returned szMsg:\n%s", szMsg ? szMsg : "NULL");
return (INT_PTR)szMsg;
}
+INT_PTR GetStatusMsgW(WPARAM wParam, LPARAM)
+{
+ LogMessage("MS_AWAYMSG_GETSTATUSMSG called. status=%d", wParam);
+ WCHAR *szMsg = mir_t2u(GetDynamicStatMsg(INVALID_CONTACT_ID, NULL, 0, wParam));
+ LogMessage("returned szMsg:\n%S", szMsg ? szMsg : L"NULL");
+ return (INT_PTR)szMsg;
+}
+
// wParam = int iMode
// lParam = char* szMsg, may be null - then we need to use the default message
INT_PTR SetStatusMode(WPARAM wParam, LPARAM lParam) // called by GamerStatus and StatCtrl