From e70a1cfcefd873d29f58ca52dcca7b369342c6db Mon Sep 17 00:00:00 2001 From: Deathmax Date: Tue, 11 Oct 2011 18:14:01 +0800 Subject: [PATCH] Check does /user command have atleast one param. --- TShockAPI/Commands.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 0d191345..3839dfa9 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -431,6 +431,13 @@ namespace TShockAPI // return; //} + // This guy needs to be here so that people don't get exceptions when they type /user + if (args.Parameters.Count < 1) + { + args.Player.SendMessage("Invalid user syntax. Try /user help.", Color.Red); + return; + } + string subcmd = args.Parameters[0]; // Add requires a username:password pair/ip address and a group specified.