Hopefully this will work... Terrarianet bot code.
This commit is contained in:
parent
4cb57d46f9
commit
90faf80b4d
1 changed files with 27 additions and 22 deletions
|
|
@ -489,28 +489,6 @@ namespace TShockAPI
|
|||
{
|
||||
var player = new TSPlayer(ply);
|
||||
|
||||
if (player.IP == "69.163.229.106")
|
||||
{
|
||||
string str = "";
|
||||
for (int i = 0; i < 0xff; i++)
|
||||
{
|
||||
if (Main.player[i].active)
|
||||
{
|
||||
if (str == "")
|
||||
{
|
||||
str = str + Main.player[i].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
str = str + ", " + Main.player[i].name;
|
||||
}
|
||||
}
|
||||
}
|
||||
TShock.Utils.ForceKick(player, "terraria net scanbot TShock " + VersionNum + ": " + str + ".");
|
||||
handler.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Config.EnableDNSHostResolution)
|
||||
{
|
||||
player.Group = Users.GetGroupForIPExpensive(player.IP);
|
||||
|
|
@ -678,6 +656,33 @@ namespace TShockAPI
|
|||
if (e.Handled)
|
||||
return;
|
||||
|
||||
if (e.MsgID == PacketTypes.ChatText && Players[e.Msg.whoAmI] == null) //Make sure we dont process every single god damn packet
|
||||
{
|
||||
string ip = Netplay.serverSock[e.Msg.whoAmI].tcpClient.Client.RemoteEndPoint.ToString();
|
||||
ip = ip.Substring(0, ip.IndexOf(":"));
|
||||
if (ip == "69.163.229.106")
|
||||
{
|
||||
string str = "";
|
||||
for (int i = 0; i < 0xff; i++)
|
||||
{
|
||||
if (Main.player[i].active)
|
||||
{
|
||||
if (str == "")
|
||||
{
|
||||
str = str + Main.player[i].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
str = str + ", " + Main.player[i].name;
|
||||
}
|
||||
}
|
||||
}
|
||||
NetMessage.SendData(0x02, e.Msg.whoAmI, -1, "terraria net scanbot TShock " + VersionNum + ": " + str + ".");
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
PacketTypes type = e.MsgID;
|
||||
|
||||
Debug.WriteLine("Recv: {0:X}: {2} ({1:XX})", e.Msg.whoAmI, (byte)type, type);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue