Selaa lähdekoodia

Adding ignores to bin, build folders
Removing old svn way of versioning now it won't work like that soon will
be implemented for git.

UnAfraid 10 vuotta sitten
vanhempi
sitoutus
9785a5fc45

+ 2 - 0
L2J_Server_BETA/.gitignore

@@ -0,0 +1,2 @@
+/bin/
+/build/

+ 1 - 18
L2J_Server_BETA/build.xml

@@ -47,7 +47,7 @@
 		</mapper>
 	</pathconvert>
 
-	<target name="init" depends="checkRequirements,getDateAndVersion" description="Create the output directories.">
+	<target name="init" depends="checkRequirements" description="Create the output directories.">
 		<delete dir="${build.bin}" quiet="true" />
 		<mkdir dir="${build.bin}" />
 	</target>
@@ -56,7 +56,6 @@
 		<sync todir="${build.dist}" includeemptydirs="true">
 			<fileset dir="dist" />
 		</sync>
-		<concat destfile="${build.dist.game}/config/l2j-version.properties">version=${l2j.version}${line.separator}builddate=${build.tstamp}</concat>
 	</target>
 
 	<target name="compile" depends="dist" description="Compile the source.">
@@ -208,20 +207,4 @@
 		<available classname="java.util.stream.Stream" property="JDK8.present" />
 		<fail unless="JDK8.present" message="Java 1.8 is required. But your version is Java ${ant.java.version} and probably JDK is not installed." />
 	</target>
-
-	<target name="getDateAndVersion" description="Get Date and Version.">
-		<tstamp>
-			<format property="build.tstamp" pattern="dd/MM/yyyy HH:mm" />
-		</tstamp>
-		<exec dir="${basedir}" executable="svnversion" outputproperty="l2j.version">
-			<arg value="-c" />
-			<redirector>
-				<outputfilterchain>
-					<tokenfilter>
-						<replaceregex pattern="[0-9]+\:" replace="" />
-					</tokenfilter>
-				</outputfilterchain>
-			</redirector>
-		</exec>
-	</target>
 </project>

+ 0 - 4
L2J_Server_BETA/dist/game/config/General.properties

@@ -13,10 +13,6 @@
 # Default: False
 EverybodyHasAdminRights = False
 
-# Show server/DP revision when players enter the game
-# Default: True
-DisplayServerRevision = True
-
 # Setting for serverList
 # Displays [] in front of server name on character selection
 # Default: False

+ 0 - 18
L2J_Server_BETA/java/com/l2jserver/Config.java

@@ -84,8 +84,6 @@ public final class Config
 	public static final String GENERAL_CONFIG_FILE = "./config/General.properties";
 	public static final String HEXID_FILE = "./config/hexid.txt";
 	public static final String ID_CONFIG_FILE = "./config/IdFactory.properties";
-	public static final String SERVER_VERSION_FILE = "./config/l2j-version.properties";
-	public static final String DATAPACK_VERSION_FILE = "./config/l2jdp-version.properties";
 	public static final String L2JMOD_CONFIG_FILE = "./config/L2JMods.properties";
 	public static final String LOGIN_CONFIGURATION_FILE = "./config/LoginServer.properties";
 	public static final String NPC_CONFIG_FILE = "./config/NPC.properties";
@@ -422,7 +420,6 @@ public final class Config
 	// General Settings
 	// --------------------------------------------------
 	public static boolean EVERYBODY_HAS_ADMIN_RIGHTS;
-	public static boolean DISPLAY_SERVER_VERSION;
 	public static boolean SERVER_LIST_BRACKET;
 	public static int SERVER_LIST_TYPE;
 	public static int SERVER_LIST_AGE;
@@ -999,9 +996,6 @@ public final class Config
 	public static String GAME_SERVER_LOGIN_HOST;
 	public static List<String> GAME_SERVER_SUBNETS;
 	public static List<String> GAME_SERVER_HOSTS;
-	public static String SERVER_VERSION;
-	public static String SERVER_BUILD_DATE;
-	public static String DATAPACK_VERSION;
 	public static int PVP_NORMAL_TIME;
 	public static int PVP_PVP_TIME;
 	
@@ -1712,17 +1706,6 @@ public final class Config
 			ALT_VALIDATE_TRIGGER_SKILLS = Character.getBoolean("AltValidateTriggerSkills", false);
 			PLAYER_MOVEMENT_BLOCK_TIME = Character.getInt("NpcTalkBlockingTime", 0) * 1000;
 			
-			// Load L2J Server Version L2Properties file (if exists)
-			final PropertiesParser serverVersion = new PropertiesParser(SERVER_VERSION_FILE);
-			
-			SERVER_VERSION = serverVersion.getString("version", "Unsupported Custom Version.");
-			SERVER_BUILD_DATE = serverVersion.getString("builddate", "Undefined Date.");
-			
-			// Load L2J Datapack Version L2Properties file (if exists)
-			final PropertiesParser dpVersion = new PropertiesParser(new File(DATAPACK_VERSION_FILE));
-			
-			DATAPACK_VERSION = dpVersion.getString("version", "Unsupported Custom Version.");
-			
 			// Load Telnet L2Properties file (if exists)
 			final PropertiesParser telnetSettings = new PropertiesParser(TELNET_FILE);
 			
@@ -1746,7 +1729,6 @@ public final class Config
 			// Load General L2Properties file (if exists)
 			final PropertiesParser General = new PropertiesParser(GENERAL_CONFIG_FILE);
 			EVERYBODY_HAS_ADMIN_RIGHTS = General.getBoolean("EverybodyHasAdminRights", false);
-			DISPLAY_SERVER_VERSION = General.getBoolean("DisplayServerRevision", true);
 			SERVER_LIST_BRACKET = General.getBoolean("ServerListBrackets", false);
 			SERVER_LIST_TYPE = getServerTypeId(General.getString("ServerListType", "Normal").split(","));
 			SERVER_LIST_AGE = General.getInt("ServerListAge", 0);

+ 2 - 11
L2J_Server_BETA/java/com/l2jserver/gameserver/GameServer.java

@@ -178,19 +178,10 @@ public class GameServer
 	
 	public GameServer() throws Exception
 	{
-		long serverLoadStart = System.currentTimeMillis();
-		
 		gameServer = this;
-		_log.finest(getClass().getSimpleName() + ": used mem:" + getUsedMemoryMB() + "MB");
+		long serverLoadStart = System.currentTimeMillis();
 		
-		if (Config.SERVER_VERSION != null)
-		{
-			_log.info(getClass().getSimpleName() + ": L2J Server Version:    " + Config.SERVER_VERSION);
-		}
-		if (Config.DATAPACK_VERSION != null)
-		{
-			_log.info(getClass().getSimpleName() + ": L2J Datapack Version:  " + Config.DATAPACK_VERSION);
-		}
+		_log.info(getClass().getSimpleName() + ": Used memory: " + getUsedMemoryMB() + "MB");
 		
 		_idFactory = IdFactory.getInstance();
 		

+ 0 - 13
L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java

@@ -436,19 +436,6 @@ public class EnterWorld extends L2GameClientPacket
 		
 		activeChar.sendMessage(getText("VGhpcyBTZXJ2ZXIgdXNlcyBMMkosIGEgUHJvamVjdCBmb3VuZGVkIGJ5IEwyQ2hlZg=="));
 		activeChar.sendMessage(getText("YW5kIGRldmVsb3BlZCBieSBMMkogVGVhbSBhdCB3d3cubDJqc2VydmVyLmNvbQ=="));
-		
-		if (Config.DISPLAY_SERVER_VERSION)
-		{
-			if (Config.SERVER_VERSION != null)
-			{
-				activeChar.sendMessage(getText("TDJKIFNlcnZlciBWZXJzaW9uOg==") + " " + Config.SERVER_VERSION);
-			}
-			
-			if (Config.DATAPACK_VERSION != null)
-			{
-				activeChar.sendMessage(getText("TDJKIERhdGFQYWNrIFZlcnNpb246") + " " + Config.DATAPACK_VERSION);
-			}
-		}
 		activeChar.sendMessage(getText("Q29weXJpZ2h0IDIwMDQtMjAxNA=="));
 		activeChar.sendMessage(getText("VGhhbmsgeW91IGZvciAxMCB5ZWFycyE="));
 		

+ 2 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/L2GameClientPacket.java

@@ -50,7 +50,7 @@ public abstract class L2GameClientPacket extends ReceivablePacket<L2GameClient>
 		}
 		catch (Exception e)
 		{
-			_log.log(Level.SEVERE, "Client: " + getClient().toString() + " - Failed reading: " + getType() + " - L2J Server Version: " + Config.SERVER_VERSION + " - DP Revision: " + Config.DATAPACK_VERSION + " ; " + e.getMessage(), e);
+			_log.log(Level.SEVERE, "Client: " + getClient().toString() + " - Failed reading: " + getType() + " ; " + e.getMessage(), e);
 			
 			if (e instanceof BufferUnderflowException)
 			{
@@ -87,7 +87,7 @@ public abstract class L2GameClientPacket extends ReceivablePacket<L2GameClient>
 		}
 		catch (Throwable t)
 		{
-			_log.log(Level.SEVERE, "Client: " + getClient().toString() + " - Failed running: " + getType() + " - L2J Server Version: " + Config.SERVER_VERSION + " - DP Revision: " + Config.DATAPACK_VERSION + " ; " + t.getMessage(), t);
+			_log.log(Level.SEVERE, "Client: " + getClient().toString() + " - Failed running: " + getType() + " ; " + t.getMessage(), t);
 			// in case of EnterWorld error kick player from game
 			if (this instanceof EnterWorld)
 			{

+ 1 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/L2GameServerPacket.java

@@ -23,7 +23,6 @@ import java.util.logging.Logger;
 
 import org.mmocore.network.SendablePacket;
 
-import com.l2jserver.Config;
 import com.l2jserver.gameserver.model.interfaces.IPositionable;
 import com.l2jserver.gameserver.model.itemcontainer.Inventory;
 import com.l2jserver.gameserver.network.L2GameClient;
@@ -110,7 +109,7 @@ public abstract class L2GameServerPacket extends SendablePacket<L2GameClient>
 		}
 		catch (Exception e)
 		{
-			_log.log(Level.SEVERE, "Client: " + getClient().toString() + " - Failed writing: " + getClass().getSimpleName() + " - L2J Server Version: " + Config.SERVER_VERSION + " - DP Revision: " + Config.DATAPACK_VERSION + " ; " + e.getMessage(), e);
+			_log.log(Level.SEVERE, "Client: " + getClient().toString() + " - Failed writing: " + getClass().getSimpleName() + " ; " + e.getMessage(), e);
 		}
 	}