sources/network/rconsession.cpp

branch
protocol5
changeset 80
f992b027374b
parent 79
62cfb7b97fc0
child 84
3bd32eec3d57
--- a/sources/network/rconsession.cpp	Sun May 17 17:22:20 2015 +0300
+++ b/sources/network/rconsession.cpp	Sun May 17 22:07:48 2015 +0300
@@ -136,11 +136,13 @@
 			case SVRC_OLDPROTOCOL:
 				m_interface->print_error ("Your RCON client is using outdated protocol.\n");
 				m_state = RCON_DISCONNECTED;
+				m_interface->disconnected();
 				break;
 
 			case SVRC_BANNED:
 				m_interface->print_error ("You have been banned from the server.\n");
 				m_state = RCON_DISCONNECTED;
+				m_interface->disconnected();
 				break;
 
 			case SVRC_SALT:
@@ -152,6 +154,7 @@
 			case SVRC_INVALIDPASSWORD:
 				m_interface->print_error ("Login failed.\n");
 				m_state = RCON_DISCONNECTED;
+				m_interface->disconnected();
 				break;
 
 			case SVRC_MESSAGE:
@@ -241,6 +244,15 @@
 					m_interface->print ("New value of %1: %2\n", name, value);
 				}
 				break;
+
+			case SVRC_YOUREDISCONNECTED:
+				{
+					String message = packet.read_string();
+					m_interface->print_error ("Connection error: %1\n", message);
+					m_state = RCON_DISCONNECTED;
+					m_interface->disconnected();
+				}
+				break;
 			}
 		}
 	}

mercurial