From 37c550c167b35a943964c25dd6aa98ec2453528e Mon Sep 17 00:00:00 2001 From: Zidonuke Date: Wed, 28 Dec 2011 10:56:45 -0500 Subject: [PATCH] Server passwords are disabled, moving this to TShock handling soon. Change stat tracker mono detection Fixed collision check to ignore tileSolidTop --- TShockAPI/Commands.cs | 18 +++++++++--------- TShockAPI/StatTracker.cs | 8 ++------ TShockAPI/TShock.cs | 6 +++--- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index da012ed1..9c4dccd3 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -2477,7 +2477,7 @@ namespace TShockAPI return; } if (args.Player.mute) - args.Player.SendMessage("You Are Muted! You Need To Be Unmuted!!"); + args.Player.SendMessage("You are muted."); else TShock.Utils.Broadcast(string.Format("*{0} {1}", args.Player.Name, String.Join(" ", args.Parameters)), 205, 133, 63); } @@ -2492,7 +2492,7 @@ namespace TShockAPI int playerTeam = args.Player.Team; if (args.Player.mute) - args.Player.SendMessage("You Are Muted! You Need To Be Unmuted!!"); + args.Player.SendMessage("You are muted."); else if (playerTeam != 0) { string msg = string.Format("<{0}> {1}", args.Player.Name, String.Join(" ", args.Parameters)); @@ -2524,18 +2524,18 @@ namespace TShockAPI { var plr = players[0]; plr.mute = false; - plr.SendMessage("You Have Been UnMuted! Thank " + args.Player.Name); - TShock.Utils.Broadcast(plr.Name + " Has Been Unmuted By " + args.Player.Name, Color.Yellow); + plr.SendMessage("You have been unmuted."); + TShock.Utils.Broadcast(plr.Name + " has been unmuted by " + args.Player.Name, Color.Yellow); } else if (!players[0].Group.HasPermission(Permissions.mute)) { var plr = players[0]; plr.mute = true; - plr.SendMessage("You Have Been Muted! You Should Have Behaved..."); - TShock.Utils.Broadcast(plr.Name + " Has Been Muted By " + args.Player.Name, Color.Yellow); + plr.SendMessage("You have been muted."); + TShock.Utils.Broadcast(plr.Name + " has been muted by " + args.Player.Name, Color.Yellow); } else - args.Player.SendMessage("You Cannot Mute Player"); + args.Player.SendMessage("You cannot mute this player."); } @@ -2567,7 +2567,7 @@ namespace TShockAPI args.Player.SendMessage("More than one player matched!", Color.Red); } else if (args.Player.mute) - args.Player.SendMessage("You Are Muted! You Need To Be Unmuted!!"); + args.Player.SendMessage("You are muted."); else { var plr = players[0]; @@ -2582,7 +2582,7 @@ namespace TShockAPI private static void Reply(CommandArgs args) { if (args.Player.mute) - args.Player.SendMessage("You Are Muted! You Need To Be Unmuted!!"); + args.Player.SendMessage("You are muted."); else if (args.Player.LastWhisper != null) { var msg = string.Join(" ", args.Parameters); diff --git a/TShockAPI/StatTracker.cs b/TShockAPI/StatTracker.cs index 2808449c..9e239f1f 100644 --- a/TShockAPI/StatTracker.cs +++ b/TShockAPI/StatTracker.cs @@ -51,10 +51,6 @@ namespace TShockAPI tr.Close(); } - string mono = "false"; - if (Type.GetType("Mono.Runtime") != null) - mono = "true"; - using (var client = new WebClient()) { client.Headers.Add("user-agent", @@ -64,11 +60,11 @@ namespace TShockAPI string response; if (TShock.Config.DisablePlayerCountReporting) { - response = client.DownloadString("http://tshock.co/tickto.php?do=log&fp=" + fp + "&ver=" + TShock.VersionNum + "&os=" + System.Environment.OSVersion.ToString() + "&mono=" + mono + "&port=" + Netplay.serverPort + "&plcount=0"); + response = client.DownloadString("http://tshock.co/tickto.php?do=log&fp=" + fp + "&ver=" + TShock.VersionNum + "&os=" + System.Environment.OSVersion.ToString() + "&mono=" + Main.runningMono + "&port=" + Netplay.serverPort + "&plcount=0"); } else { - response = client.DownloadString("http://tshock.co/tickto.php?do=log&fp=" + fp + "&ver=" + TShock.VersionNum + "&os=" + System.Environment.OSVersion.ToString() + "&mono=" + mono + "&port=" + Netplay.serverPort + "&plcount=" + TShock.Utils.ActivePlayers()); + response = client.DownloadString("http://tshock.co/tickto.php?do=log&fp=" + fp + "&ver=" + TShock.VersionNum + "&os=" + System.Environment.OSVersion.ToString() + "&mono=" + Main.runningMono + "&port=" + Netplay.serverPort + "&plcount=" + TShock.Utils.ActivePlayers()); } Log.ConsoleInfo("Stat Tracker: " + response + "\n"); } diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index d65eeb82..76ad7fb9 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -643,7 +643,7 @@ namespace TShockAPI } else if (tsplr.mute) { - tsplr.SendMessage("You Are Muted! You Need To Be Unmuted!!"); + tsplr.SendMessage("You are muted!"); e.Handled = true; } } @@ -1220,7 +1220,7 @@ namespace TShockAPI { for (int h = y; h < y + 4; h++) { - if (!Main.tile[i, h].active || !Main.tileSolid[Main.tile[i, h].type]) + if (!Main.tile[i, h].active || !Main.tileSolid[Main.tile[i, h].type] || Main.tileSolidTop[Main.tile[i, h].type]) return false; } } @@ -1249,7 +1249,7 @@ namespace TShockAPI if (file.MaxSlots > 235) file.MaxSlots = 235; Main.maxNetPlayers = file.MaxSlots + 20; - + Netplay.password = ""; Netplay.spamCheck = false; RconHandler.Password = file.RconPassword;