Griefing != Cheating
This commit is contained in:
parent
818348a445
commit
f5a76dd154
3 changed files with 35 additions and 8 deletions
|
|
@ -219,7 +219,7 @@ namespace TShockAPI
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines what to do with someone listed in cheaters.txt
|
||||
/// Adds someone to cheaters.txt
|
||||
/// </summary>
|
||||
/// <param name="ply">int player</param>
|
||||
public static void HandleCheater(int ply)
|
||||
|
|
@ -229,7 +229,6 @@ namespace TShockAPI
|
|||
string cheater = Tools.FindPlayer(ply);
|
||||
string ip = Tools.GetRealIP(Convert.ToString(Netplay.serverSock[ply].tcpClient.Client.RemoteEndPoint));
|
||||
|
||||
FileTools.WriteGrief(ply);
|
||||
FileTools.WriteCheater(ply);
|
||||
if (!ConfigurationManager.kickCheater) { return; }
|
||||
Netplay.serverSock[ply].kill = true;
|
||||
|
|
@ -238,6 +237,26 @@ namespace TShockAPI
|
|||
Tools.Broadcast(cheater + " was " + (ConfigurationManager.banCheater ? "banned " : "kicked ") + "for cheating.");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds someone to greifers.txt
|
||||
/// </summary>
|
||||
/// <param name="ply">int player</param>
|
||||
public static void HandleGreifer(int ply)
|
||||
{
|
||||
if (!TShock.players[ply].IsAdmin())
|
||||
{
|
||||
string cheater = Tools.FindPlayer(ply);
|
||||
string ip = Tools.GetRealIP(Convert.ToString(Netplay.serverSock[ply].tcpClient.Client.RemoteEndPoint));
|
||||
|
||||
FileTools.WriteGrief(ply);
|
||||
if (!ConfigurationManager.kickGriefer) { return; }
|
||||
Netplay.serverSock[ply].kill = true;
|
||||
Netplay.serverSock[ply].Reset();
|
||||
NetMessage.syncPlayers();
|
||||
Tools.Broadcast(cheater + " was " + (ConfigurationManager.banCheater ? "banned " : "kicked ") + "for greifing.");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Shows a MOTD to the player
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue