71 { |
71 { |
72 // Say goodbye to remote |
72 // Say goodbye to remote |
73 Bytestream packet; |
73 Bytestream packet; |
74 packet.write_byte (CLRC_DISCONNECT); |
74 packet.write_byte (CLRC_DISCONNECT); |
75 this->send (packet); |
75 this->send (packet); |
76 m_interface->print ("Disconnected from %s\n", m_address.to_string (IPAddress::WITH_PORT).chars()); |
76 m_interface->disconnected(); |
77 m_interface->update_statusbar(); |
|
78 } |
77 } |
79 |
78 |
80 m_state = RCON_DISCONNECTED; |
79 m_state = RCON_DISCONNECTED; |
81 } |
80 } |
82 |
81 |
183 |
182 |
184 for (int i = packet.read_byte(); i > 0; --i) |
183 for (int i = packet.read_byte(); i > 0; --i) |
185 { |
184 { |
186 String message = packet.read_string(); |
185 String message = packet.read_string(); |
187 message.normalize(); |
186 message.normalize(); |
188 m_interface->print ("--- %s\n", message.chars()); |
187 m_interface->print_text ("--- %s\n", message.chars()); |
189 } |
188 } |
190 |
189 |
191 m_interface->print ("End of previous messages.\n"); |
190 m_interface->print ("End of previous messages.\n"); |
192 |
191 |
193 // Watch sv_hostname so that we can update the titlebar when it changes. |
192 // Watch sv_hostname so that we can update the titlebar when it changes. |