From c7a4a00fa8b68bc4e3107b50372738068d062e80 Mon Sep 17 00:00:00 2001 From: Deathmax Date: Fri, 1 Jul 2011 20:53:15 +0800 Subject: [PATCH] /whisper now combines all arguments after player name --- TShockAPI/Commands.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 999a8852..88dcda7b 100755 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -1327,8 +1327,12 @@ namespace TShockAPI else { var plr = players[0]; - plr.SendMessage("(Whisper From)" + "<" + args.Player.Name + ">" + args.Parameters[1], Color.MediumPurple); - args.Player.SendMessage("(Whisper To)" + "<" + plr.Name + ">" + args.Parameters[1], Color.MediumPurple); + var msg = ""; + for (int i = 2; i < args.Parameters.Count; i++ ) + msg += args.Parameters[i] + " "; + msg = msg.TrimEnd(new char[] { ' ' }); + plr.SendMessage("(Whisper From)" + "<" + args.Player.Name + ">" + msg, Color.MediumPurple); + args.Player.SendMessage("(Whisper To)" + "<" + plr.Name + ">" + msg, Color.MediumPurple); } } #endregion General Commands