aboutsummaryrefslogtreecommitdiff
path: root/src/courtroom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/courtroom.cpp')
-rw-r--r--src/courtroom.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index a29788a0..55b8b0fe 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -46,7 +46,9 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
ui_vp_background = new BackgroundLayer(ui_viewport, ao_app);
ui_vp_speedlines = new SplashLayer(ui_viewport, ao_app);
ui_vp_player_char = new CharLayer(ui_viewport, ao_app);
+ ui_vp_player_char->masked = false;
ui_vp_sideplayer_char = new CharLayer(ui_viewport, ao_app);
+ ui_vp_sideplayer_char->masked = false;
ui_vp_sideplayer_char->hide();
ui_vp_desk = new BackgroundLayer(ui_viewport, ao_app);
@@ -1645,6 +1647,11 @@ void Courtroom::append_server_chatmessage(QString p_name, QString p_message,
ui_server_chatlog->append_chatmessage(p_name, p_message, color);
+
+ if (ao_app->get_auto_logging_enabled() && !ao_app->log_filename.isEmpty()) {
+ QString full = "[OOC][" + QDateTime::currentDateTime().toUTC().toString() + "] " + p_name + ": " + p_message;
+ ao_app->append_to_file(full, ao_app->log_filename, true);
+ }
}
void Courtroom::on_authentication_state_received(int p_state)
@@ -3382,21 +3389,8 @@ void Courtroom::chat_tick()
// Alignment characters
if (tick_pos < 2) {
- if (f_rest.startsWith("~~")) {
- tick_pos = f_rest.indexOf("~~");
- f_rest.remove(tick_pos, 2);
- tick_pos += 2;
- }
- else if (f_rest.startsWith("~>")) {
- tick_pos = f_rest.indexOf("~>");
- f_rest.remove(tick_pos, 2);
+ if (f_rest.startsWith("~~") || f_rest.startsWith("~>") || f_rest.startsWith("<>"))
tick_pos += 2;
- }
- else if (f_rest.startsWith("<>")) {
- tick_pos = f_rest.indexOf("<>");
- f_rest.remove(tick_pos, 2);
- tick_pos += 2;
- }
}
f_rest.remove(0, tick_pos);
QTextBoundaryFinder tbf(QTextBoundaryFinder::Grapheme, f_rest);