134 switch (ServerResponse (header)) |
134 switch (ServerResponse (header)) |
135 { |
135 { |
136 case SVRC_OLDPROTOCOL: |
136 case SVRC_OLDPROTOCOL: |
137 m_interface->print_error ("Your RCON client is using outdated protocol.\n"); |
137 m_interface->print_error ("Your RCON client is using outdated protocol.\n"); |
138 m_state = RCON_DISCONNECTED; |
138 m_state = RCON_DISCONNECTED; |
|
139 m_interface->disconnected(); |
139 break; |
140 break; |
140 |
141 |
141 case SVRC_BANNED: |
142 case SVRC_BANNED: |
142 m_interface->print_error ("You have been banned from the server.\n"); |
143 m_interface->print_error ("You have been banned from the server.\n"); |
143 m_state = RCON_DISCONNECTED; |
144 m_state = RCON_DISCONNECTED; |
|
145 m_interface->disconnected(); |
144 break; |
146 break; |
145 |
147 |
146 case SVRC_SALT: |
148 case SVRC_SALT: |
147 m_salt = packet.read_string(); |
149 m_salt = packet.read_string(); |
148 m_state = RCON_AUTHENTICATING; |
150 m_state = RCON_AUTHENTICATING; |
239 String name = packet.read_string(); |
242 String name = packet.read_string(); |
240 String value = packet.read_string(); |
243 String value = packet.read_string(); |
241 m_interface->print ("New value of %1: %2\n", name, value); |
244 m_interface->print ("New value of %1: %2\n", name, value); |
242 } |
245 } |
243 break; |
246 break; |
|
247 |
|
248 case SVRC_YOUREDISCONNECTED: |
|
249 { |
|
250 String message = packet.read_string(); |
|
251 m_interface->print_error ("Connection error: %1\n", message); |
|
252 m_state = RCON_DISCONNECTED; |
|
253 m_interface->disconnected(); |
|
254 } |
|
255 break; |
244 } |
256 } |
245 } |
257 } |
246 } |
258 } |
247 catch (std::exception& e) |
259 catch (std::exception& e) |
248 { |
260 { |