diff options
Diffstat (limited to 'packet_distribution.cpp')
| -rw-r--r-- | packet_distribution.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/packet_distribution.cpp b/packet_distribution.cpp index bd713bb..5990d25 100644 --- a/packet_distribution.cpp +++ b/packet_distribution.cpp @@ -39,4 +39,27 @@ void AOApplication::ms_packet_received(AOPacket *p_packet) w_lobby->list_servers(); } } + else if (header == "CT") + { + QStringList f_contents = p_packet->get_contents(); + + QString message_line; + + if (f_contents.size() == 1) + message_line = f_contents.at(0); + else if (f_contents.size() >= 2) + message_line = f_contents.at(0) + ": " + f_contents.at(1); + else + return; + + if (lobby_constructed) + { + w_lobby->append_chat_message(message_line); + } + if (courtroom_constructed) + { + //T0D0: uncomment this when it's implemented + //w_courtroom->append_chat_message(message_line); + } + } } |
