From e34b256fc69803d4eac6ebbb89b3e98497e08d25 Mon Sep 17 00:00:00 2001 From: KrewsOrg Date: Tue, 30 Apr 2019 20:47:43 +0100 Subject: [PATCH] Removed TheGeneral's Callback codes from arcturus --- .gitignore | 1 + src/main/java/com/eu/habbo/Emulator.java | 7 ++----- src/main/java/com/eu/habbo/core/CleanerThread.java | 7 +++---- src/main/java/com/eu/habbo/core/Logging.java | 12 ++++++------ .../java/com/eu/habbo/database/DatabasePool.java | 2 +- .../networking/gameserver/GameMessageHandler.java | 2 +- .../com/eu/habbo/util/callback/HTTPPostError.java | 4 ++-- .../com/eu/habbo/util/callback/HTTPPostStatus.java | 7 ++++--- .../com/eu/habbo/util/callback/HTTPVersionCheck.java | 4 +++- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 284f2381..04b8b762 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ logging/ +compiled-builds/ *.iml .idea/ target/** diff --git a/src/main/java/com/eu/habbo/Emulator.java b/src/main/java/com/eu/habbo/Emulator.java index 905ae9e7..d185e644 100644 --- a/src/main/java/com/eu/habbo/Emulator.java +++ b/src/main/java/com/eu/habbo/Emulator.java @@ -153,19 +153,16 @@ public final class Emulator Emulator.getLogging().logStart("Emulator settings runtime.threads (" + Emulator.getConfig().getInt("runtime.threads") + ") can be increased to " + (Runtime.getRuntime().availableProcessors() * 2) + " to possibly increase performance."); } - if (Emulator.getConfig().getValue("username").isEmpty()) - { - Emulator.getLogging().logErrorLine("No account has been found in config.ini Please create an account on Arcturus.pw and edit the config.ini in order to maximize usage of Arcturus! http://arcturus.pw"); - } Emulator.getThreading().run(new Runnable() { @Override public void run() { + Emulator.getLogging().logStart("Arcturus Morningstar does not include a camera by default, if you wish to have that feature please download the PNGCamera plugin!"); Emulator.getLogging().logStart("This is not an official arcturus build. This is a community forked version released under the GPL License. You are breaking no laws by using this software... Except for copyright infringement from sulake i suppose... oopsie."); Emulator.getLogging().logStart("- Krews.org Team"); - System.out.println("Waiting for command: "); + System.out.println("Waiting for commands: "); } }, 3500); diff --git a/src/main/java/com/eu/habbo/core/CleanerThread.java b/src/main/java/com/eu/habbo/core/CleanerThread.java index 5297a13c..4a72b178 100644 --- a/src/main/java/com/eu/habbo/core/CleanerThread.java +++ b/src/main/java/com/eu/habbo/core/CleanerThread.java @@ -5,8 +5,7 @@ import com.eu.habbo.habbohotel.users.Habbo; import com.eu.habbo.messages.incoming.friends.SearchUserEvent; import com.eu.habbo.messages.incoming.navigator.SearchRoomsEvent; import com.eu.habbo.threading.runnables.AchievementUpdater; -import com.eu.habbo.util.callback.HTTPPostStatus; -import com.eu.habbo.util.callback.HTTPVersionCheck; + import java.sql.Connection; import java.sql.PreparedStatement; @@ -77,7 +76,7 @@ public class CleanerThread implements Runnable { Emulator.getThreading().run(new AchievementUpdater()); - Emulator.getThreading().run(new HTTPVersionCheck(), 10000); + // Emulator.getThreading().run(new HTTPVersionCheck(), 10000); } @Override @@ -126,7 +125,7 @@ public class CleanerThread implements Runnable { if (time - LAST_CALLBACK > CALLBACK_TIME) { - Emulator.getThreading().run(new HTTPPostStatus()); + // Emulator.getThreading().run(new HTTPPostStatus()); LAST_CALLBACK = time; } diff --git a/src/main/java/com/eu/habbo/core/Logging.java b/src/main/java/com/eu/habbo/core/Logging.java index c1ddde3e..13427b1e 100644 --- a/src/main/java/com/eu/habbo/core/Logging.java +++ b/src/main/java/com/eu/habbo/core/Logging.java @@ -2,7 +2,6 @@ package com.eu.habbo.core; import com.eu.habbo.Emulator; import com.eu.habbo.habbohotel.rooms.RoomChatMessage; -import com.eu.habbo.util.callback.HTTPPostError; import gnu.trove.set.hash.THashSet; import io.netty.util.internal.ConcurrentSet; @@ -241,7 +240,7 @@ public class Logging this.logSQLException((SQLException) line); return; } - Emulator.getThreading().run(new HTTPPostError((Throwable) line)); + // Emulator.getThreading().run(new HTTPPostError((Throwable) line)); this.errorLogs.add(new ErrorLog("Exception", (Throwable) line)); @@ -258,7 +257,7 @@ public class Logging e.printStackTrace(); this.write(errorsSQLWriter, e); - Emulator.getThreading().run(new HTTPPostError(e)); + //Emulator.getThreading().run(new HTTPPostError(e)); } } @@ -281,7 +280,7 @@ public class Logging return; } - Emulator.getThreading().run(new HTTPPostError((Throwable) e)); + // Emulator.getThreading().run(new HTTPPostError((Throwable) e)); } } @@ -405,7 +404,7 @@ public class Logging { return packetsUndefinedWriter; } - + /* public static PrintWriter getErrorsPacketsWriter() { return errorsPacketsWriter; @@ -421,8 +420,9 @@ public class Logging return errorsRuntimeWriter; } - public static PrintWriter getDebugFileWriter() + public static PrintWriter getDebugFileWriter() { return debugFileWriter; } + */ } \ No newline at end of file diff --git a/src/main/java/com/eu/habbo/database/DatabasePool.java b/src/main/java/com/eu/habbo/database/DatabasePool.java index 9f4ec904..f87190c0 100644 --- a/src/main/java/com/eu/habbo/database/DatabasePool.java +++ b/src/main/java/com/eu/habbo/database/DatabasePool.java @@ -30,7 +30,7 @@ class DatabasePool databaseConfiguration.addDataSourceProperty("dataSource.dumpQueriesOnException", "true"); databaseConfiguration.addDataSourceProperty("prepStmtCacheSize", "500"); databaseConfiguration.addDataSourceProperty("prepStmtCacheSqlLimit", "2048"); - databaseConfiguration.addDataSourceProperty("dataSource.logWriter", Logging.getErrorsSQLWriter()); + // databaseConfiguration.addDataSourceProperty("dataSource.logWriter", Logging.getErrorsSQLWriter()); databaseConfiguration.addDataSourceProperty("cachePrepStmts", "true"); databaseConfiguration.addDataSourceProperty("useServerPrepStmts", "true"); databaseConfiguration.addDataSourceProperty("rewriteBatchedStatements", "true"); diff --git a/src/main/java/com/eu/habbo/networking/gameserver/GameMessageHandler.java b/src/main/java/com/eu/habbo/networking/gameserver/GameMessageHandler.java index dc733eaa..eef09b5d 100644 --- a/src/main/java/com/eu/habbo/networking/gameserver/GameMessageHandler.java +++ b/src/main/java/com/eu/habbo/networking/gameserver/GameMessageHandler.java @@ -62,7 +62,7 @@ public class GameMessageHandler extends ChannelInboundHandlerAdapter { if (!(cause instanceof IOException)) { - cause.printStackTrace(Logging.getErrorsRuntimeWriter()); + // cause.printStackTrace(Logging.getErrorsRuntimeWriter()); } } diff --git a/src/main/java/com/eu/habbo/util/callback/HTTPPostError.java b/src/main/java/com/eu/habbo/util/callback/HTTPPostError.java index dfbcb7ea..df4a731b 100644 --- a/src/main/java/com/eu/habbo/util/callback/HTTPPostError.java +++ b/src/main/java/com/eu/habbo/util/callback/HTTPPostError.java @@ -8,7 +8,7 @@ import java.io.StringWriter; import java.net.HttpURLConnection; import java.net.URL; -public class HTTPPostError implements Runnable +/* public class HTTPPostError implements Runnable { public Throwable stackTrace; @@ -60,4 +60,4 @@ public class HTTPPostError implements Runnable { } } -} +} */ diff --git a/src/main/java/com/eu/habbo/util/callback/HTTPPostStatus.java b/src/main/java/com/eu/habbo/util/callback/HTTPPostStatus.java index af635713..fec700e5 100644 --- a/src/main/java/com/eu/habbo/util/callback/HTTPPostStatus.java +++ b/src/main/java/com/eu/habbo/util/callback/HTTPPostStatus.java @@ -1,4 +1,4 @@ -package com.eu.habbo.util.callback; +/* package com.eu.habbo.util.callback; import com.eu.habbo.Emulator; @@ -6,7 +6,7 @@ import java.io.DataOutputStream; import java.net.HttpURLConnection; import java.net.URL; -public class HTTPPostStatus implements Runnable + public class HTTPPostStatus implements Runnable { private void sendPost() throws Exception { @@ -36,4 +36,5 @@ public class HTTPPostStatus implements Runnable { } } -} \ No newline at end of file +} +*/ \ No newline at end of file diff --git a/src/main/java/com/eu/habbo/util/callback/HTTPVersionCheck.java b/src/main/java/com/eu/habbo/util/callback/HTTPVersionCheck.java index 46ca42d2..05ce6291 100644 --- a/src/main/java/com/eu/habbo/util/callback/HTTPVersionCheck.java +++ b/src/main/java/com/eu/habbo/util/callback/HTTPVersionCheck.java @@ -10,7 +10,7 @@ import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; -public class HTTPVersionCheck implements Runnable +/* public class HTTPVersionCheck implements Runnable { private void sendPost() { @@ -73,4 +73,6 @@ public class HTTPVersionCheck implements Runnable } + } + */