diff options
author | Mataes <mataes2007@gmail.com> | 2020-04-07 22:22:36 +0300 |
---|---|---|
committer | Mataes <mataes2007@gmail.com> | 2020-04-07 22:23:15 +0300 |
commit | fd567ad2c518d0c0337f8da6e9bae37c17e06ad6 (patch) | |
tree | 92f9d9988069b6ed875820413d02da7972a68d65 /plugins/NewStory/src/templates.cpp | |
parent | e39077a9164aa50d0e6ebf9b8cbad5ca2e3c6625 (diff) |
newstory: fixed [2293]
Diffstat (limited to 'plugins/NewStory/src/templates.cpp')
-rw-r--r-- | plugins/NewStory/src/templates.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp index 48fffaa62a..fc9fa15e0d 100644 --- a/plugins/NewStory/src/templates.cpp +++ b/plugins/NewStory/src/templates.cpp @@ -102,7 +102,7 @@ int TplMeasureVars(TemplateVars *vars, wchar_t *str) } // Loading variables -void vfGlobal(int, TemplateVars *vars, MCONTACT, HistoryArray::ItemData *) +void vfGlobal(int, TemplateVars *vars, MCONTACT, HistoryArray::ItemData *item) { // %%: simply % character vars->SetVar('%', L"%", false); @@ -110,10 +110,10 @@ void vfGlobal(int, TemplateVars *vars, MCONTACT, HistoryArray::ItemData *) // %n: line break vars->SetVar('n', L"\x0d\x0a", false); - // %M: my nick (not for messages) - //todo: not working now - wchar_t *buf = Clist_GetContactDisplayName(0, 0); - vars->SetVar('M', buf, false); + // %S: my nick (not for messages) + char* proto = Proto_GetBaseAccountName(item->hContact); + ptrW nick(Contact_GetInfo(CNF_DISPLAY, 0, proto)); + vars->SetVar('S', nick, false); } void vfContact(int, TemplateVars *vars, MCONTACT hContact, HistoryArray::ItemData *) |