sources/network/rconsession.cpp

changeset 32
ee770597a281
parent 31
b5b5a6a96d91
child 38
80b26bc9707a
child 47
35b968619b0c
--- a/sources/network/rconsession.cpp	Mon Dec 15 03:09:26 2014 +0200
+++ b/sources/network/rconsession.cpp	Mon Dec 15 04:01:58 2014 +0200
@@ -144,12 +144,9 @@
 				break;
 
 			case SVRC_SALT:
-				{
-					String salt = packet.read_string();
-					m_salt = salt;
-					m_state = RCON_AUTHENTICATING;
-					send_password();
-				}
+				m_salt = packet.read_string();
+				m_state = RCON_AUTHENTICATING;
+				send_password();
 				break;
 
 			case SVRC_INVALIDPASSWORD:
@@ -160,9 +157,7 @@
 			case SVRC_MESSAGE:
 				{
 					String message = packet.read_string();
-					if (message.ends_with ("\n"))
-						message.remove_from_end (1);
-
+					message.normalize();
 					print ("%1\n", message);
 				}
 				break;

mercurial