aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorscatterflower <marisaposs@gameboyprinter.moe>2020-08-16 21:55:14 -0500
committerscatterflower <marisaposs@gameboyprinter.moe>2020-08-16 21:55:14 -0500
commit359cad73d40fff68ee51a8a81d37e9d18a8b7407 (patch)
tree4b669a42a504e08a8cae864b4c767e322b1fd9cb /src
parentae7c36e609d5571afc62193e5158f98c6cf5b4e7 (diff)
use shownames in log properly
Diffstat (limited to 'src')
-rw-r--r--src/courtroom.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index b0699cb5..5100ee80 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -1856,8 +1856,12 @@ void Courtroom::handle_chatmessage(QStringList *p_contents)
// Let the server handle actually checking if they're allowed to do this.
is_additive = m_chatmessage[ADDITIVE].toInt() == 1;
+ QString f_charname = "";
+ if (f_char_id >= 0)
+ f_charname = ao_app->get_showname(char_list.at(f_char_id).name);
+
chatlogpiece *temp =
- new chatlogpiece(f_displayname, f_displayname, m_chatmessage[MESSAGE], false, m_chatmessage[TEXT_COLOR].toInt());
+ new chatlogpiece(f_charname, f_displayname, m_chatmessage[MESSAGE], false, m_chatmessage[TEXT_COLOR].toInt());
ic_chatlog_history.append(*temp);
if (ao_app->get_auto_logging_enabled())
ao_app->append_to_file(temp->get_full(), ao_app->log_filename, true);