Check does /user command have atleast one param.

This commit is contained in:
Deathmax 2011-10-11 18:14:01 +08:00
parent 9a810d0c11
commit e70a1cfcef

View file

@ -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.