Merge remote-tracking branch 'upstream/master'

Conflicts:
	TShockAPI/TShock.cs
	TShockAPI/Tools.cs
This commit is contained in:
ricky 2011-06-07 23:07:14 +10:00
commit edffd29a69
2 changed files with 5 additions and 6 deletions

View file

@ -549,7 +549,6 @@ namespace TShockAPI
}
string ip = Tools.GetPlayerIP(ply);
players[ply] = new TSPlayer(ply);
players[ply].group = Tools.GetGroupForIP(ip);
@ -604,7 +603,7 @@ namespace TShockAPI
{
return;
}
for (uint i = 0; i < Main.maxPlayers; i++)
for (int i = 0; i < Main.maxPlayers; i++)
{
if (Main.player[i].active == false)
{
@ -614,9 +613,9 @@ namespace TShockAPI
{
if (Main.player[i] != null)
{
if (Tools.HandleTntUser((int)i, "Kill tile abuse detected."))
if (Tools.HandleTntUser(i, "Kill tile abuse detected."))
{
RevertKillTile((int)i);
RevertKillTile(i);
players[i].tileThreshold = 0;
players[i].tilesDestroyed.Clear();
}

View file

@ -226,7 +226,7 @@ namespace TShockAPI
/// <param name="reason">string reason</param>
public static bool Kick(int ply, string reason, string adminUserName = "")
{
if (!Main.player[ply].active)
if (!Netplay.serverSock[ply].active || Netplay.serverSock[ply].kill)
return true;
if (!TShock.players[ply].group.HasPermission("immunetokick"))
{
@ -254,7 +254,7 @@ namespace TShockAPI
string ip = GetPlayerIP(plr);
string playerName = Main.player[plr].name;
TShock.Bans.AddBan(ip, playerName, reason);
if (!Main.player[plr].active)
if (!Main.player[plr].active || Netplay.serverSock[ply].kill)
NetMessage.SendData(0x2, plr, -1, "Banned: " + reason, 0x0, 0f, 0f, 0f);
Log.Info("Banned " + playerName + " for : " + reason);
if (adminUserName.Length == 0)