Change Bouncer initialization to a more permanent home
This commit is contained in:
parent
1bee289daf
commit
0260530848
2 changed files with 6 additions and 3 deletions
|
|
@ -33,12 +33,12 @@ using Terraria.Localization;
|
||||||
|
|
||||||
namespace TShockAPI
|
namespace TShockAPI
|
||||||
{
|
{
|
||||||
/// <summary>Bouncer is the TShock anti-hack and build guardian system</summary>
|
/// <summary>Bouncer is the TShock anti-hack and anti-cheat system.</summary>
|
||||||
internal sealed class Bouncer
|
internal sealed class Bouncer
|
||||||
{
|
{
|
||||||
/// <summary>Constructor call initializes Bouncer and related functionality.</summary>
|
/// <summary>Constructor call initializes Bouncer and related functionality.</summary>
|
||||||
/// <returns>A new Bouncer.</returns>
|
/// <returns>A new Bouncer.</returns>
|
||||||
internal Bouncer(TerrariaPlugin pluginInstance)
|
internal Bouncer()
|
||||||
{
|
{
|
||||||
// Setup hooks
|
// Setup hooks
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,9 @@ namespace TShockAPI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static Dictionary<string, SecureRest.TokenData> RESTStartupTokens = new Dictionary<string, SecureRest.TokenData>();
|
public static Dictionary<string, SecureRest.TokenData> RESTStartupTokens = new Dictionary<string, SecureRest.TokenData>();
|
||||||
|
|
||||||
|
/// <summary>The TShock anti-cheat/anti-exploit system.</summary>
|
||||||
|
internal Bouncer Bouncer;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called after TShock is initialized. Useful for plugins that needs hooks before tshock but also depend on tshock being loaded.
|
/// Called after TShock is initialized. Useful for plugins that needs hooks before tshock but also depend on tshock being loaded.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -322,6 +325,7 @@ namespace TShockAPI
|
||||||
RestApi = new SecureRest(Netplay.ServerIP, Config.RestApiPort);
|
RestApi = new SecureRest(Netplay.ServerIP, Config.RestApiPort);
|
||||||
RestManager = new RestManager(RestApi);
|
RestManager = new RestManager(RestApi);
|
||||||
RestManager.RegisterRestfulCommands();
|
RestManager.RegisterRestfulCommands();
|
||||||
|
Bouncer = new Bouncer();
|
||||||
|
|
||||||
var geoippath = "GeoIP.dat";
|
var geoippath = "GeoIP.dat";
|
||||||
if (Config.EnableGeoIP && File.Exists(geoippath))
|
if (Config.EnableGeoIP && File.Exists(geoippath))
|
||||||
|
|
@ -379,7 +383,6 @@ namespace TShockAPI
|
||||||
Log.ConsoleInfo("TShock comes with no warranty & is free software.");
|
Log.ConsoleInfo("TShock comes with no warranty & is free software.");
|
||||||
Log.ConsoleInfo("You can modify & distribute it under the terms of the GNU GPLv3.");
|
Log.ConsoleInfo("You can modify & distribute it under the terms of the GNU GPLv3.");
|
||||||
|
|
||||||
Bouncer b = new Bouncer(this);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue