Removed TheGeneral's Callback codes from arcturus

This commit is contained in:
KrewsOrg 2019-04-30 20:47:43 +01:00
parent b4f2bd5bf7
commit e34b256fc6
9 changed files with 23 additions and 23 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
logging/
compiled-builds/
*.iml
.idea/
target/**

View File

@ -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);

View File

@ -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;
}

View File

@ -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;
@ -425,4 +424,5 @@ public class Logging
{
return debugFileWriter;
}
*/
}

View File

@ -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");

View File

@ -62,7 +62,7 @@ public class GameMessageHandler extends ChannelInboundHandlerAdapter
{
if (!(cause instanceof IOException))
{
cause.printStackTrace(Logging.getErrorsRuntimeWriter());
// cause.printStackTrace(Logging.getErrorsRuntimeWriter());
}
}

View File

@ -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
{
}
}
}
} */

View File

@ -1,4 +1,4 @@
package com.eu.habbo.util.callback;
/* package com.eu.habbo.util.callback;
import com.eu.habbo.Emulator;
@ -37,3 +37,4 @@ public class HTTPPostStatus implements Runnable
}
}
}
*/

View File

@ -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
}
}
*/