Better logs with OOC logging, [IC] and [OOC] tags (#519)
* Add OOC logging to the .log files, making them infinitely more precious to GMs especially of ambitious multi-area RPs Add [IC] and [OOC] tags to distinguish between the types of msg * minor wording change for .log top line to make it clearer that it's the server address and not the user address Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
This commit is contained in:
parent
31073d090f
commit
81c0f9a569
@ -1647,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)
|
||||
|
@ -308,7 +308,7 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
|
||||
this->log_filename = QDateTime::currentDateTime().toUTC().toString(
|
||||
"'logs/" + server_name.remove(QRegExp("[\\\\/:*?\"<>|\']")) +
|
||||
"/'yyyy-MM-dd hh-mm-ss t'.log'");
|
||||
this->write_to_file("Joined server " + server_name + " on address " +
|
||||
this->write_to_file("Joined server " + server_name + " hosted on address " +
|
||||
server_address + " on " +
|
||||
QDateTime::currentDateTime().toUTC().toString(),
|
||||
log_filename, true);
|
||||
|
Loading…
Reference in New Issue
Block a user