Browse Source

BETA: Minor fix for Telnet:

Reported by: Tavo22
Zoey76 12 years ago
parent
commit
3a714dda7e

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/status/GameStatusThread.java

@@ -165,7 +165,7 @@ public class GameStatusThread extends Thread
 			}
 			else
 			{
-				if (tmpLine.compareTo(StatusPW) != 0)
+				if (!tmpLine.equals(StatusPW))
 				{
 					_print.println("Incorrect Password!");
 					_print.println("Disconnected...");

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/status/LoginStatusThread.java

@@ -153,7 +153,7 @@ public class LoginStatusThread extends Thread
 			}
 			else
 			{
-				if (tmpLine.compareTo(StatusPW) != 0)
+				if (!tmpLine.equals(StatusPW))
 				{
 					_print.println("Incorrect Password!");
 					_print.println("Disconnected...");

+ 3 - 2
L2J_Server_BETA/java/com/l2jserver/status/Status.java

@@ -47,10 +47,11 @@ public class Status extends Thread
 	{
 		setPriority(Thread.MAX_PRIORITY);
 		
-		while (true)
+		while (!isInterrupted())
 		{
-			try (Socket connection = statusServerSocket.accept())
+			try
 			{
+				Socket connection = statusServerSocket.accept();
 				if (_mode == Server.MODE_GAMESERVER)
 				{
 					new GameStatusThread(connection, _uptime, _statusPw);