diff --git a/courtroom.cpp b/courtroom.cpp index db2ab06..101f0e0 100644 --- a/courtroom.cpp +++ b/courtroom.cpp @@ -20,8 +20,6 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow() keepalive_timer = new QTimer(this); keepalive_timer->start(60000); - disconnect_timer = new QTimer(this); - disconnect_timer->setSingleShot(true); chat_tick_timer = new QTimer(this); @@ -249,8 +247,6 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow() connect(ui_evidence_button, SIGNAL(clicked()), this, SLOT(on_evidence_button_clicked())); - connect(disconnect_timer, SIGNAL(timeout()), this, SLOT(connection_timeout())); - construct_char_select(); set_widgets(); @@ -1927,23 +1923,6 @@ void Courtroom::on_evidence_button_clicked() void Courtroom::ping_server() { ao_app->send_server_packet(new AOPacket("CH#" + QString::number(m_cid) + "#%")); - disconnect_timer->start(20000); -} - -void Courtroom::check_connection_received() -{ - disconnect_timer->stop(); -} - -void Courtroom::connection_timeout() -{ - //cheap hack because demonsoftware refuses to conform to standards - if (ao_app->server_software.startsWith("AODemon")) - return; - - call_notice("Disconnected from server."); - ao_app->construct_lobby(); - ao_app->destruct_courtroom(); } Courtroom::~Courtroom() diff --git a/courtroom.h b/courtroom.h index 54b0a37..eba49db 100644 --- a/courtroom.h +++ b/courtroom.h @@ -116,9 +116,6 @@ private: //triggers ping_server() every 60 seconds QTimer *keepalive_timer; - //how long we wait for the server to respond on a ping - QTimer *disconnect_timer; - //determines how fast messages tick onto screen QTimer *chat_tick_timer; int chat_tick_interval = 60; @@ -423,8 +420,6 @@ private slots: void char_clicked(int n_char); void ping_server(); - void connection_timeout(); - }; #endif // COURTROOM_H diff --git a/packet_distribution.cpp b/packet_distribution.cpp index 3b89092..6cd89b2 100644 --- a/packet_distribution.cpp +++ b/packet_distribution.cpp @@ -542,11 +542,6 @@ void AOApplication::server_packet_received(AOPacket *p_packet) if (courtroom_constructed && f_contents.size() > 0) w_courtroom->mod_called(f_contents.at(0)); } - else if (header == "checkconnection" || header == "CHECK") - { - if (courtroom_constructed) - w_courtroom->check_connection_received(); - } end: