Removed unimportant messages from OnSecondUpdate()
Removed check ignores failed and player disabled for not being logged in whilst SSC is enabled console messages, as they are incessant in larger servers. The messages are not informative as they are not reasonably actionable by the console, and there is no point in spamming server operators about such issues.
This commit is contained in:
parent
556a5ca560
commit
4167a9b627
2 changed files with 17 additions and 7 deletions
|
|
@ -875,13 +875,23 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
var trace = new StackTrace();
|
||||
StackFrame frame = null;
|
||||
frame = trace.GetFrame(1);
|
||||
if (frame != null && frame.GetMethod().DeclaringType != null)
|
||||
TShock.Log.Debug(frame.GetMethod().DeclaringType.Name + " called Disable().");
|
||||
/*
|
||||
* Calling new StackTrace() is incredibly expensive, and must be disabled
|
||||
* in release builds. Use a conditional call instead.
|
||||
*/
|
||||
LogStackFrame();
|
||||
}
|
||||
|
||||
[Conditional("DEBUG")]
|
||||
private void LogStackFrame()
|
||||
{
|
||||
var trace = new StackTrace();
|
||||
StackFrame frame = null;
|
||||
frame = trace.GetFrame(1);
|
||||
if (frame != null && frame.GetMethod().DeclaringType != null)
|
||||
TShock.Log.Debug(frame.GetMethod().DeclaringType.Name + " called Disable().");
|
||||
}
|
||||
|
||||
public virtual void Whoopie(object time)
|
||||
{
|
||||
var time2 = (int) time;
|
||||
|
|
|
|||
|
|
@ -966,7 +966,7 @@ namespace TShockAPI
|
|||
{
|
||||
if (CheckIgnores(player))
|
||||
{
|
||||
player.Disable("not being logged in while SSC is enabled", flags);
|
||||
player.Disable(flags: flags);
|
||||
}
|
||||
else if (Itembans.ItemIsBanned(player.TPlayer.inventory[player.TPlayer.selectedItem].name, player))
|
||||
{
|
||||
|
|
@ -1046,7 +1046,7 @@ namespace TShockAPI
|
|||
|
||||
if (CheckIgnores(player))
|
||||
{
|
||||
player.Disable("check ignores failed in OnSecondUpdate()", flags);
|
||||
player.Disable(flags: flags);
|
||||
}
|
||||
else if (Itembans.ItemIsBanned(player.TPlayer.inventory[player.TPlayer.selectedItem].name, player))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue