summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/icq_xstatus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_xstatus.cpp')
-rw-r--r--protocols/IcqOscarJ/src/icq_xstatus.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp
index a06b0a1241..0a98def4bf 100644
--- a/protocols/IcqOscarJ/src/icq_xstatus.cpp
+++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp
@@ -519,6 +519,30 @@ void CIcqProto::updateServerCustomStatus(int fullUpdate)
SetStatusMood(szMoodData, 1500);
}
+
+ char *szStatusNote = nullptr;
+
+ // use custom status message as status note
+ if (bXStatus && (m_bXStatusEnabled || m_bMoodsEnabled))
+ szStatusNote = getSettingStringUtf(NULL, DBSETTING_XSTATUS_MSG, "");
+ // retrieve standard status message (e.g. custom status set to none)
+ else {
+ char **pszMsg = MirandaStatusToAwayMsg(m_iStatus);
+ {
+ mir_cslock l(m_modeMsgsMutex);
+ if (pszMsg)
+ szStatusNote = null_strdup(*pszMsg);
+ }
+
+ // no default status message, set empty
+ if (!szStatusNote)
+ szStatusNote = null_strdup("");
+ }
+
+ if (szStatusNote)
+ SetStatusNote(szStatusNote, 1500, FALSE);
+
+ SAFE_FREE(&szStatusNote);
}
static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)