diff options
| author | windrammer <31085911+likeawindrammer@users.noreply.github.com> | 2020-07-31 14:14:39 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-31 15:14:39 -0500 |
| commit | 36b5af3cb9ce8e5530c5bd9353a4e2f10da506b6 (patch) | |
| tree | 19e9217126837cac1ae3ab025b050bb3cfbda64b /src/courtroom.cpp | |
| parent | bab10ea14ddaf7af7aeeff925b373be1c347d0d7 (diff) | |
Add option for automatic logging (#203)
Just so we're on the same page, this is enabled by default.
Co-authored-by: Cents02 <Cents02@Cents0.me>
Diffstat (limited to 'src/courtroom.cpp')
| -rw-r--r-- | src/courtroom.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index b203cf08..98b6a9c3 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1870,7 +1870,8 @@ void Courtroom::handle_chatmessage(QStringList *p_contents) chatlogpiece *temp = new chatlogpiece(f_charname, f_showname, m_chatmessage[MESSAGE], false, m_chatmessage[TEXT_COLOR].toInt()); ic_chatlog_history.append(*temp); - ao_app->append_to_file(temp->get_full(), ao_app->log_filename, true); + if (ao_app->get_auto_logging_enabled()) + ao_app->append_to_file(temp->get_full(), ao_app->log_filename, true); while (ic_chatlog_history.size() > log_maximum_blocks && log_maximum_blocks > 0) { @@ -3175,7 +3176,8 @@ void Courtroom::handle_song(QStringList *p_contents) if (!mute_map.value(n_char)) { chatlogpiece *temp = new chatlogpiece(str_char, str_show, f_song, true, m_chatmessage[TEXT_COLOR].toInt()); ic_chatlog_history.append(*temp); - ao_app->append_to_file(temp->get_full(), ao_app->log_filename, true); + if (ao_app->get_auto_logging_enabled()) + ao_app->append_to_file(temp->get_full(), ao_app->log_filename, true); while (ic_chatlog_history.size() > log_maximum_blocks && log_maximum_blocks > 0) { |
