Kick on KANNIBALE specific items.
This commit is contained in:
parent
67f8760ba3
commit
8b59e1c525
2 changed files with 6 additions and 3 deletions
|
|
@ -153,6 +153,8 @@ namespace TShockAPI
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public string TileAbuseReason = "Tile abuse ({0})";
|
public string TileAbuseReason = "Tile abuse ({0})";
|
||||||
[Description("")]
|
[Description("")]
|
||||||
|
public string GriefClientReason = "Grief client detected ({0})";
|
||||||
|
[Description("")]
|
||||||
public bool EnableDNSHostResolution;
|
public bool EnableDNSHostResolution;
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public bool EnableBanOnUsernames;
|
public bool EnableBanOnUsernames;
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ namespace TShockAPI
|
||||||
{PacketTypes.ChestGetContents, HandleChest},
|
{PacketTypes.ChestGetContents, HandleChest},
|
||||||
{PacketTypes.SignNew, HandleSign},
|
{PacketTypes.SignNew, HandleSign},
|
||||||
{PacketTypes.PlayerSlot, HandlePlayerSlot},
|
{PacketTypes.PlayerSlot, HandlePlayerSlot},
|
||||||
{PacketTypes.TileGetSection, HandleGetSection}
|
{PacketTypes.TileGetSection, HandleGetSection},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -152,9 +152,10 @@ namespace TShockAPI
|
||||||
string itemname = Encoding.ASCII.GetString(args.Data.ReadBytes(namelength));
|
string itemname = Encoding.ASCII.GetString(args.Data.ReadBytes(namelength));
|
||||||
|
|
||||||
if (!args.Player.Group.HasPermission(Permissions.usebanneditem) && TShock.Itembans.ItemIsBanned(itemname))
|
if (!args.Player.Group.HasPermission(Permissions.usebanneditem) && TShock.Itembans.ItemIsBanned(itemname))
|
||||||
{
|
|
||||||
args.Player.Disconnect("Using banned item: " + itemname + ", remove it and rejoin");
|
args.Player.Disconnect("Using banned item: " + itemname + ", remove it and rejoin");
|
||||||
}
|
if (itemname == "KANNIBALE BLADE"
|
||||||
|
|| itemname == "Super Gel")
|
||||||
|
return Tools.HandleCheater(args.Player, string.Format(TShock.Config.GriefClientReason, "KANNIBALE"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue