From e6f06d8959ff65be11b20dcba27977f8935bb044 Mon Sep 17 00:00:00 2001 From: Salanto <62221668+Salanto@users.noreply.github.com> Date: Tue, 15 Feb 2022 15:15:57 +0100 Subject: Add server description to favourites, if supported by server. (#648) * Allow servers to directly set the server description * Hijack PN packet to add description. * Update lobby.cpp Apply suggested change --- src/packet_distribution.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/packet_distribution.cpp') diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp index ac319ef6..0ddadd8c 100644 --- a/src/packet_distribution.cpp +++ b/src/packet_distribution.cpp @@ -143,6 +143,10 @@ void AOApplication::server_packet_received(AOPacket *p_packet) w_lobby->set_player_count(f_contents.at(0).toInt(), f_contents.at(1).toInt()); + if (f_contents.size() >= 3) { + w_lobby->set_server_description(f_contents.at(2)); + } + if (w_lobby->doubleclicked) { send_server_packet(new AOPacket("askchaa#%")); w_lobby->doubleclicked = false; -- cgit