diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2021-12-30 21:47:35 -0600 |
|---|---|---|
| committer | oldmud0 <oldmud0@users.noreply.github.com> | 2021-12-30 21:47:41 -0600 |
| commit | e29a41b58ffdcaaa8dc7d73c7d8e7b6674f4f51a (patch) | |
| tree | 22f112d9c04fd0c31c7d97c9b6b8a93c4760f42c /src/packet_distribution.cpp | |
| parent | 8822db8e828b9d5fbb4f21124b5fb41d1acdeb55 (diff) | |
Remove AO1 MS code
You won't be missed :')
Diffstat (limited to 'src/packet_distribution.cpp')
| -rw-r--r-- | src/packet_distribution.cpp | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp index 9b56fae3..26abf962 100644 --- a/src/packet_distribution.cpp +++ b/src/packet_distribution.cpp @@ -6,103 +6,6 @@ #include "lobby.h" #include "networkmanager.h" -void AOApplication::ms_packet_received(AOPacket *p_packet) -{ - QString header = p_packet->get_header(); - - // Some packets need to handle decode/encode separately - if (header != "SC") { - p_packet->net_decode(); - } - QStringList f_contents = p_packet->get_contents(); - -#ifdef DEBUG_NETWORK - if (header != "CHECK") - qDebug() << "R(ms):" << p_packet->to_string(); -#endif - - if (header == "ALL") { - server_list.clear(); - - for (QString i_string : p_packet->get_contents()) { - server_type f_server; - QStringList sub_contents = i_string.split("&"); - - if (sub_contents.size() < 4) { - qWarning() << "malformed packet"; - continue; - } - - f_server.name = sub_contents.at(0); - f_server.desc = sub_contents.at(1); - f_server.ip = sub_contents.at(2); - f_server.port = sub_contents.at(3).toInt(); - - server_list.append(f_server); - } - - if (lobby_constructed) { - w_lobby->list_servers(); - } - } - else if (header == "CT") { - QString f_name, f_message; - - if (f_contents.size() == 1) { - f_name = ""; - f_message = f_contents.at(0); - } - else if (f_contents.size() >= 2) { - f_name = f_contents.at(0); - f_message = f_contents.at(1); - } - else - goto end; - - if (lobby_constructed) { - w_lobby->append_chatmessage(f_name, f_message); - } - if (courtroom_constructed && courtroom_loaded) { - w_courtroom->append_server_chatmessage(tr("[Global] %1").arg(f_name), - f_message, "0"); - } - } - else if (header == "AO2CHECK") { - if (f_contents.size() < 1) - goto end; - - QStringList version_contents = f_contents.at(0).split("."); - - if (version_contents.size() < 3) - goto end; - - int f_release = version_contents.at(0).toInt(); - int f_major = version_contents.at(1).toInt(); - int f_minor = version_contents.at(2).toInt(); - - if (get_release() > f_release) - goto end; - else if (get_release() == f_release) { - if (get_major_version() > f_major) - goto end; - else if (get_major_version() == f_major) { - if (get_minor_version() >= f_minor) - goto end; - } - } - - call_notice(tr("Outdated version! Your version: %1\n" - "Please go to aceattorneyonline.com to update.") - .arg(get_version_string())); - destruct_courtroom(); - destruct_lobby(); - } - -end: - - delete p_packet; -} - void AOApplication::append_to_demofile(QString packet_string) { if (get_demo_logging_enabled() && !log_filename.isEmpty()) |
