Merge branch 'master' of github.com:TShock/TShock
This commit is contained in:
commit
3bbbafc94d
3 changed files with 11 additions and 6 deletions
|
|
@ -17,7 +17,6 @@ namespace TShockAPI
|
||||||
public static bool infiniteInvasion;
|
public static bool infiniteInvasion;
|
||||||
public static bool permaPvp;
|
public static bool permaPvp;
|
||||||
public static int killCount;
|
public static int killCount;
|
||||||
public static bool startedInvasion;
|
|
||||||
public static bool kickCheater = true;
|
public static bool kickCheater = true;
|
||||||
public static bool banCheater = true;
|
public static bool banCheater = true;
|
||||||
public static bool kickGriefer = true;
|
public static bool kickGriefer = true;
|
||||||
|
|
|
||||||
|
|
@ -843,8 +843,11 @@ namespace TShockAPI
|
||||||
|
|
||||||
public static void Ban(int plr, string reason = "")
|
public static void Ban(int plr, string reason = "")
|
||||||
{
|
{
|
||||||
Tools.Kick(plr, reason);
|
if (!players[plr].group.HasPermission("immunetoban"))
|
||||||
Bans.AddBan(Tools.GetPlayerIP(plr), Main.player[plr].name, reason);
|
{
|
||||||
|
Tools.Kick(plr,"Banned: " + reason);
|
||||||
|
Bans.AddBan(Tools.GetPlayerIP(plr), Main.player[plr].name, reason);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Position
|
public class Position
|
||||||
|
|
|
||||||
|
|
@ -215,9 +215,12 @@ namespace TShockAPI
|
||||||
/// <param name="reason">string reason</param>
|
/// <param name="reason">string reason</param>
|
||||||
public static void Kick(int ply, string reason)
|
public static void Kick(int ply, string reason)
|
||||||
{
|
{
|
||||||
string displayName = FindPlayer(ply).Equals("") ? GetPlayerIP(ply) : FindPlayer(ply);
|
if (!TShock.players[ply].group.HasPermission("immunetokick") || reason.Contains("Banned: "))
|
||||||
NetMessage.SendData(0x2, ply, -1, reason, 0x0, 0f, 0f, 0f);
|
{
|
||||||
Log.Info("Kicked " + displayName + " for : " + reason);
|
string displayName = FindPlayer(ply).Equals("") ? GetPlayerIP(ply) : FindPlayer(ply);
|
||||||
|
NetMessage.SendData(0x2, ply, -1, reason, 0x0, 0f, 0f, 0f);
|
||||||
|
Log.Info("Kicked " + displayName + " for : " + reason);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue