Added hacky way of dealing with spammed build protection messages.
This commit is contained in:
parent
d57300099e
commit
fa41521986
4 changed files with 9 additions and 6 deletions
|
|
@ -246,8 +246,11 @@ namespace TShockAPI
|
||||||
int y = args.Data.ReadInt32();
|
int y = args.Data.ReadInt32();
|
||||||
byte tiletype = args.Data.ReadInt8();
|
byte tiletype = args.Data.ReadInt8();
|
||||||
if (!args.Player.Group.HasPermission("canbuild"))
|
if (!args.Player.Group.HasPermission("canbuild"))
|
||||||
|
{
|
||||||
|
if (!args.Player.HasBeenSpammedWithBuildMessage)
|
||||||
{
|
{
|
||||||
args.Player.SendMessage("You do not have permission to build!", Color.Red);
|
args.Player.SendMessage("You do not have permission to build!", Color.Red);
|
||||||
|
}
|
||||||
args.Player.SendTileSquare(x, y);
|
args.Player.SendTileSquare(x, y);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ namespace TShockAPI
|
||||||
public int LoginAttempts { get; set; }
|
public int LoginAttempts { get; set; }
|
||||||
public Vector2 TeleportCoords = new Vector2(-1, -1);
|
public Vector2 TeleportCoords = new Vector2(-1, -1);
|
||||||
public string UserName { get; set; }
|
public string UserName { get; set; }
|
||||||
|
public bool HasBeenSpammedWithBuildMessage = false;
|
||||||
Player FakePlayer = null;
|
Player FakePlayer = null;
|
||||||
|
|
||||||
public bool RealPlayer
|
public bool RealPlayer
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ namespace TShockAPI
|
||||||
public class TShock : TerrariaPlugin
|
public class TShock : TerrariaPlugin
|
||||||
{
|
{
|
||||||
public static readonly Version VersionNum = Assembly.GetExecutingAssembly().GetName().Version;
|
public static readonly Version VersionNum = Assembly.GetExecutingAssembly().GetName().Version;
|
||||||
public static readonly string VersionCodename = "This is the part where we fix TShock";
|
public static readonly string VersionCodename = "Skanky Hacker: The Deathly Database Part 2";
|
||||||
|
|
||||||
public static string SavePath = "tshock";
|
public static string SavePath = "tshock";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,11 +56,11 @@
|
||||||
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
|
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
|
||||||
<Reference Include="MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
<Reference Include="MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\TShock Testing Environment\MySql.Data.dll</HintPath>
|
<HintPath>SqlBins\MySql.Data.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MySql.Web, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
<Reference Include="MySql.Web, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\TShock Testing Environment\MySql.Web.dll</HintPath>
|
<HintPath>SqlBins\MySql.Web.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json">
|
<Reference Include="Newtonsoft.Json">
|
||||||
<HintPath>.\Newtonsoft.Json.dll</HintPath>
|
<HintPath>.\Newtonsoft.Json.dll</HintPath>
|
||||||
|
|
@ -162,7 +162,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<UserProperties BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" BuildVersion_BuildAction="Both" BuildVersion_BuildVersioningStyle="None.None.None.MonthAndDayStamp" BuildVersion_StartDate="2011/6/17" BuildVersion_IncrementBeforeBuild="False" />
|
<UserProperties BuildVersion_IncrementBeforeBuild="False" BuildVersion_StartDate="2011/6/17" BuildVersion_BuildVersioningStyle="None.None.None.MonthAndDayStamp" BuildVersion_BuildAction="Both" BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue