Added BIGINT and expanded log errors

This commit is contained in:
PhoenixICE 2014-02-24 14:27:31 +11:00
parent 2e8398d4a2
commit 7d18575d96
2 changed files with 5 additions and 0 deletions

View file

@ -67,6 +67,7 @@ namespace TShockAPI.DB
{ MySqlDbType.Double, "REAL" },
{ MySqlDbType.Int32, "INTEGER" },
{ MySqlDbType.Blob, "BLOB" },
{ MySqlDbType.Int64, "BIGINT"},
};
public string DbTypeToString(MySqlDbType type, int? length)
@ -115,6 +116,7 @@ namespace TShockAPI.DB
{ MySqlDbType.Float, "FLOAT" },
{ MySqlDbType.Double, "DOUBLE" },
{ MySqlDbType.Int32, "INT" },
{ MySqlDbType.Int64, "BIGINT"},
};
public string DbTypeToString(MySqlDbType type, int? length)

View file

@ -1334,6 +1334,7 @@ namespace TShockAPI
if (cur < 0 || cur > 500 || max < 100 || max > 500) //Abnormal values have the potential to cause infinite loops in the server.
{
TShock.Utils.ForceKick(args.Player, "Crash Exploit Attempt", true);
Log.ConsoleError("HP Exploit Attempt: Current HP {0}, Max HP {0}", cur, max);
return true;
}
@ -2523,6 +2524,7 @@ namespace TShockAPI
if (dmg > 20000) //Abnormal values have the potential to cause infinite loops in the server.
{
TShock.Utils.ForceKick(args.Player, "Crash Exploit Attempt", true);
Log.ConsoleError("Death Exploit Attempt: Damage {0}", dmg);
return false;
}
@ -3023,6 +3025,7 @@ namespace TShockAPI
if (dmg > 12000) //Abnormal values have the potential to cause infinite loops in the server.
{ //12000 because Skely Prime Head does 10339 or some bs during the day.
TShock.Utils.ForceKick(args.Player, "Crash Exploit Attempt", true);
Log.ConsoleError("Damage Exploit Attempt: Damage {0}", dmg);
return false;
}