summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewStory/src/templates.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp
index 463140f157..fc6bb62843 100644
--- a/plugins/NewStory/src/templates.cpp
+++ b/plugins/NewStory/src/templates.cpp
@@ -251,9 +251,12 @@ void vfEvent(int, TemplateVars *vars, MCONTACT, ItemData *item)
// %N: Nickname
if (item->dbe.flags & DBEF_SENT) {
- char *proto = Proto_GetBaseAccountName(item->hContact);
- ptrW nick(Contact::GetInfo(CNF_DISPLAY, 0, proto));
- vars->SetNick(nick, false);
+ if (!item->wszNick) {
+ char *proto = Proto_GetBaseAccountName(item->hContact);
+ ptrW nick(Contact::GetInfo(CNF_DISPLAY, 0, proto));
+ vars->SetNick(nick, false);
+ }
+ else vars->SetNick(item->wszNick, false);
}
else {
wchar_t *nick = (item->wszNick) ? item->wszNick : Clist_GetContactDisplayName(item->hContact, 0);