diff options
| author | Crystalwarrior <Varsash@Gmail.com> | 2020-12-28 10:19:15 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-28 01:19:15 -0600 |
| commit | 570bad6d4775df19229fb7beae7c6a011220bc1c (patch) | |
| tree | 9e676790d7d2d3a90f16a20305990a680166cf0d | |
| parent | 39a8ab8ab2d7791c1954649b1fb96c52d498105f (diff) | |
Fix blankposting not respecting character ID's in the equation (#282)
Fixes an issue where if you blankpost on top of another character's blankpost, your message won't show up on the ic log clientside.
| -rw-r--r-- | src/courtroom.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 9b3b2062..e39c3d9a 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1810,6 +1810,7 @@ void Courtroom::handle_chatmessage(QStringList *p_contents) if (p_contents->size() < MS_MINIMUM) return; + int prev_char_id = m_chatmessage[CHAR_ID].toInt(); for (int n_string = 0; n_string < MS_MAXIMUM; ++n_string) { // Note that we have added stuff that vanilla clients and servers simply // won't send. So now, we have to check if the thing we want even exists @@ -1878,8 +1879,8 @@ void Courtroom::handle_chatmessage(QStringList *p_contents) m_chatmessage[MESSAGE] = ""; // Turn it into true blankpost } - if (!m_chatmessage[MESSAGE].isEmpty() || ic_chatlog_history.isEmpty() || - ic_chatlog_history.last().get_message() != "") { + if (prev_char_id != f_char_id || !m_chatmessage[MESSAGE].isEmpty() || + ic_chatlog_history.isEmpty() || ic_chatlog_history.last().get_message() != "") { log_ic_text(f_charname, f_displayname, m_chatmessage[MESSAGE], "", m_chatmessage[TEXT_COLOR].toInt()); append_ic_text(m_chatmessage[MESSAGE], f_displayname, "", |
