diff options
| author | OmniTroid <davidskoland@gmail.com> | 2017-03-29 21:12:33 +0200 |
|---|---|---|
| committer | OmniTroid <davidskoland@gmail.com> | 2017-03-29 21:12:33 +0200 |
| commit | b92981ff9578b2cfb9b173b9d56146459a65fb7b (patch) | |
| tree | b69c51eda13df0ae7110b14cb993d2cfd063429e /packet_distribution.cpp | |
| parent | 3495dfae3aee770c1026ff9e7095dee83c745a5b (diff) | |
finished jud, hlp and hld desks. ready to release 2.3.1
Diffstat (limited to 'packet_distribution.cpp')
| -rw-r--r-- | packet_distribution.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/packet_distribution.cpp b/packet_distribution.cpp index 857e730b..4c0e15fb 100644 --- a/packet_distribution.cpp +++ b/packet_distribution.cpp @@ -49,22 +49,28 @@ void AOApplication::ms_packet_received(AOPacket *p_packet) } else if (header == "CT") { - QString message_line; + QString f_name, f_message; if (f_contents.size() == 1) - message_line = f_contents.at(0); + { + f_name = ""; + f_message = f_contents.at(0); + } else if (f_contents.size() >= 2) - message_line = f_contents.at(0) + ": " + f_contents.at(1); + { + f_name = f_contents.at(0); + f_message = f_contents.at(1); + } else goto end; if (lobby_constructed) { - w_lobby->append_chatmessage(message_line); + w_lobby->append_chatmessage(f_name, f_message); } if (courtroom_constructed && courtroom_loaded) { - w_courtroom->append_ms_chatmessage(message_line); + w_courtroom->append_ms_chatmessage(f_name, f_message); } } else if (header == "AO2CHECK") @@ -453,7 +459,7 @@ void AOApplication::server_packet_received(AOPacket *p_packet) goto end; if (lobby_constructed) - w_courtroom->append_ms_chatmessage(w_lobby->get_chatlog()); + w_courtroom->append_ms_chatmessage("", w_lobby->get_chatlog()); w_courtroom->done_received(); |
