Fix Skeletron Prime Crash Exploiting people, naughty naughty
Set secondUpdate to stop displaying, because apparently no one knows that not being logged in is breaking the rules when requirelogin:true
This commit is contained in:
parent
c112f433c5
commit
0d350d53fa
3 changed files with 12 additions and 5 deletions
|
|
@ -790,7 +790,7 @@ namespace TShockAPI
|
|||
}
|
||||
|
||||
private DateTime LastDisableNotification = DateTime.UtcNow;
|
||||
public virtual void Disable(string reason = "")
|
||||
public virtual void Disable(string reason = "", bool displayConsole = true)
|
||||
{
|
||||
LastThreat = DateTime.UtcNow;
|
||||
SetBuff(33, 330, true); //Weak
|
||||
|
|
@ -800,7 +800,14 @@ namespace TShockAPI
|
|||
{
|
||||
if ((DateTime.UtcNow - LastDisableNotification).TotalMilliseconds > 5000)
|
||||
{
|
||||
Log.ConsoleInfo(string.Format("Player {0} has been disabled for {1}.", Name, reason));
|
||||
if (displayConsole)
|
||||
{
|
||||
Log.ConsoleInfo(string.Format("Player {0} has been disabled for {1}.", Name, reason));
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Info("Player {0} has been disabled for {1}.", Name, reason);
|
||||
}
|
||||
LastDisableNotification = DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue