diff --git a/src/main/java/com/comandante/creeper/Main.java b/src/main/java/com/comandante/creeper/Main.java index e2058d3cdfc72bf85949ac68ca7abe8a1a195eee..b13ba6f86b5b9867c2fd0f3437deb106725139bd 100644 --- a/src/main/java/com/comandante/creeper/Main.java +++ b/src/main/java/com/comandante/creeper/Main.java @@ -41,20 +41,19 @@ public class Main { final public static MetricRegistry metrics = new MetricRegistry(); - final public static String CREEPER_VERSION = getCreeperVersion(); - final public static Set<Character> vowels = new HashSet<Character>(Arrays.asList('a', 'e', 'i', 'o', 'u')); public static String getCreeperVersion() { Properties props = new Properties(); try { - props.load(Main.class.getResourceAsStream("resources/build.properties")); - } catch (IOException e) { + props.load(Main.class.getResourceAsStream("/build.properties")); + } catch (Exception e) { log.error("Problem reading build properties file.", e); return "0"; } - String someProperty = props.getProperty("build.version"); - return someProperty; + String buildVersion = props.getProperty("build.version"); + String buildTimestamp = props.getProperty("build.timestamp"); + return buildVersion + " " + buildTimestamp; } public static void main(String[] args) throws Exception { diff --git a/src/main/java/com/comandante/creeper/server/CreeperAuthenticationHandler.java b/src/main/java/com/comandante/creeper/server/CreeperAuthenticationHandler.java index b7176629b1602abd87cc851d4bc7dace743f4960..efd8a6caf6ca29b2483a470f9ae7e0f5ce3151ab 100644 --- a/src/main/java/com/comandante/creeper/server/CreeperAuthenticationHandler.java +++ b/src/main/java/com/comandante/creeper/server/CreeperAuthenticationHandler.java @@ -134,7 +134,7 @@ public class CreeperAuthenticationHandler extends SimpleChannelUpstreamHandler { } else { creeperSession.setAuthed(true); creeperSession.setState(CreeperSession.State.authed); - e.getChannel().write("Welcome to creeper. (version: " + Main.CREEPER_VERSION + ")\r\n"); + e.getChannel().write("Welcome to creeper. (version: " + Main.getCreeperVersion() + ")\r\n"); } }