Merge remote-tracking branch 'upstream/master'
Conflicts: TShockAPI/Commands.cs TShockAPI/TShock.cs TShockAPI/Tools.cs
This commit is contained in:
commit
c368518caa
5 changed files with 96 additions and 41 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Content;
|
||||
using Terraria;
|
||||
|
|
@ -206,8 +207,10 @@ namespace TShockAPI
|
|||
{
|
||||
Tools.ForceKick(e.Msg.whoAmI, "You are banned: " + ban.Reason);
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
else if (Main.player[e.Msg.whoAmI].name.Length > 32)
|
||||
string name = Encoding.ASCII.GetString(e.Msg.readBuffer, e.Index + 23, (e.Length - (e.Index + 23)) + e.Index - 1);
|
||||
if (name.Length > 32)
|
||||
{
|
||||
Tools.ForceKick(e.Msg.whoAmI, "Name exceeded 32 characters.");
|
||||
e.Handled = true;
|
||||
|
|
@ -417,6 +420,10 @@ namespace TShockAPI
|
|||
byte liquid = br.ReadByte();
|
||||
bool lava = br.ReadBoolean();
|
||||
|
||||
//The liquid was picked up.
|
||||
if (liquid == 0)
|
||||
return;
|
||||
|
||||
int plyX = Math.Abs((int)Main.player[e.Msg.whoAmI].position.X / 16);
|
||||
int plyY = Math.Abs((int)Main.player[e.Msg.whoAmI].position.Y / 16);
|
||||
int tileX = Math.Abs(x);
|
||||
|
|
@ -610,6 +617,8 @@ namespace TShockAPI
|
|||
if (Tools.HandleTntUser((int)i, "Kill tile abuse detected."))
|
||||
{
|
||||
RevertKillTile((int)i);
|
||||
players[i].tileThreshold = 0;
|
||||
players[i].tilesDestroyed.Clear();
|
||||
}
|
||||
else if (players[i].tileThreshold > 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue