summaryrefslogtreecommitdiff
path: root/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewAwaySysMod/src/MsgEventAdded.cpp')
-rw-r--r--plugins/NewAwaySysMod/src/MsgEventAdded.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
index b624a2d088..87c6bf8c3d 100644
--- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
+++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
@@ -234,13 +234,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam)
GetDynamicStatMsg(hContact); // it updates VarParseData.Message needed for %extratext% in the format
TCString Reply(*(TCString*)AutoreplyOptData.GetValue(IDC_REPLYDLG_PREFIX));
if (Reply != NULL && ServiceExists(MS_VARS_FORMATSTRING) && !g_SetAwayMsgPage.GetDBValueCopy(IDS_SAWAYMSG_DISABLEVARIABLES)) {
- FORMATINFO fi = { 0 };
- fi.cbSize = sizeof(FORMATINFO);
- fi.tszFormat = Reply;
- fi.hContact = hContact;
- fi.flags = FIF_TCHAR;
- fi.tszExtraText = VarParseData.Message;
- TCHAR *szResult = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
+ TCHAR *szResult = variables_parse(Reply, VarParseData.Message, hContact);
if (szResult != NULL) {
Reply = szResult;
mir_free(szResult);